Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

BusinessLogicHandler.IsDotNetAssembly Property


Applies To: SQL Server 2016 Preview

Gets or sets a value that indicates whether the registered business logic handler is a managed code assembly.

Namespace:   Microsoft.SqlServer.Replication
Assembly:  Microsoft.SqlServer.Rmo (in Microsoft.SqlServer.Rmo.dll)

public bool IsDotNetAssembly { get; set; }

Property Value

Type: System.Boolean

true if the business logic handler is a managed code assembly; false if the business logic handler is not a managed code assembly.

The IsDotNetAssembly property must be set to true before calling RegisterBusinessLogicHandler.

Any user can retrieve or set the FriendlyName property.

Legacy Code Example

			// Specify the Distributor name and business logic properties.
			string distributorName = publisherInstance;
			string assemblyName = @"C:\Program Files\Microsoft SQL Server\110\COM\CustomLogic.dll";
			string className = "Microsoft.Samples.SqlServer.BusinessLogicHandler.OrderEntryBusinessLogicHandler";
			string friendlyName = "OrderEntryLogic";

			ReplicationServer distributor;
			BusinessLogicHandler customLogic;

				// Create a connection to the Distributor.
			ServerConnection distributorConn = new ServerConnection(distributorName);

				// Connect to the Distributor.

				// Set the Distributor properties.
				distributor = new ReplicationServer(distributorConn);

				// Set the business logic handler properties.
				customLogic = new BusinessLogicHandler();
				customLogic.DotNetAssemblyName = assemblyName;
				customLogic.DotNetClassName = className;
				customLogic.FriendlyName = friendlyName;
				customLogic.IsDotNetAssembly = true;

				Boolean isRegistered = false;

				// Check if the business logic handler is already registered at the Distributor.
				foreach (BusinessLogicHandler registeredLogic
					in distributor.EnumBusinessLogicHandlers())
					if (registeredLogic == customLogic)
						isRegistered = true;

				// Register the custom logic.
				if (!isRegistered)
			catch (Exception ex)
				// Do error handling here.
				throw new ApplicationException(string.Format(
					"The {0} assembly could not be registered.",
					assemblyName), ex);
Return to top
© 2015 Microsoft