This topic contains information about licensing and redistribution.

This topic contains the following sections.

License Agreement

This software is available under the terms and conditions of the DigitalRune Software License Agreement.

A copy of this license agreement is distributed with the software and can also be found on the DigitalRune Website under Legal Terms.

Evaluation Period

The software can be evaluated for a certain period after which the software will cease functioning. The evaluation period is usually 30 days. See Legal Terms for more details. In the evaluation period the features of the software are not limited, so that you can thoroughly test if it fits your needs.

Note

During the evaluation period it is only allowed to use the software for internal evaluation. It is not allowed to redistribute the software. Without valid license keys it will cease to work after the evaluation period (or after a built-in expiration date).

After the evaluation period has expired a dialog similar to the following will appear:

Screenshot: Trial period has expired.

The dialog will appear as soon as a type or method of the software libraries is accessed. In the .NET code an exception will be thrown to indicate that the software can no longer be used.

Note

In builds for platforms that do not support Windows Forms (Silverlight, Xbox 360, etc.) a different kind of dialog (or no dialog at all) will be displayed at the end of the evaluation period. On all platforms a .NET exception will be thrown with a message indicating the end of the evaluation period.

To use the software after the evaluation period license keys need to be set as described below.

License Keys (Serial Numbers)

When purchasing DigitalRune libraries you will receive one (or more) unique license keys (also called "serial numbers") that unlock the software.

To activate the libraries call the following code from your .NET application:

C# Copy imageCopy
DigitalRune.Licensing.AddSerialNumber("NgAAALB9g24...DUOpXZDKjDG2eIDt7ncOo8=");   // 1st license key
DigitalRune.Licensing.AddSerialNumber("NgAAALB9g24...DKldjg98öä0ßaaS=9");         // 2nd license key
...

These lines of code need to be called once in each .NET application that references and uses the DigitalRune libraries. It must be called before any types or methods of the libraries are accessed - it is recommended to set the license keys in the Main method of the application or in the static constructor of the main class of the application.

Note

In Windows Phone 7 XNA applications, the Program.Main method is not called. In WP7 games it is recommended to set the license keys in the static constructor of the Game class. Check out the Windows Phone 7 samples that come with the DigitalRune libraries.

Note

If you use only one DigitalRune product (or product bundle), you will probably only need to set one license keys. If you use several different DigitalRune products, you will have to set a license key for each product.

If you have upgraded a DigitalRune product, you will have to set the license key of the original product and the license key of the upgrade.

Just be sure to call AddSerialNumber(String) for all license keys that you have received when you bought the product(s)! The order in which you set the license keys is not relevant.

Redistributable Components

You may redistribute any of the following components as part of your own application:

  • DigitalRune.dll

  • DigitalRune.Animation.dll

  • DigitalRune.Game.dll

  • DigitalRune.Game.Input.dll

  • DigitalRune.Game.UI.dll

  • DigitalRune.Geometry.dll

  • DigitalRune.Graphics.dll

  • DigitalRune.Mathematics.dll

  • DigitalRune.Particles.dll

  • DigitalRune.Physics.dll

  • DigitalRune.Physics.Specialized.dll

  • DigitalRune.ServiceLocation.dll

  • Microsoft.Practices.ServiceLocation.dll

The XNA content files (*.XNB) in the folder Content may be redistributed as part of an application that uses DigitalRune Graphics.

License keys (serial numbers) are private information and must not be shared publicly. License keys must not be redistributed in plain text, like public source code file or public text files. License keys can only be redistributed as part of compiled code. It is recommended to obfuscate .NET assemblies containing license keys using an obfuscator that supports string encryption - but it is not required to do so.

Redistribution is subject to the terms and conditions laid out in the DigitalRune Software License Agreement. You may not distribute any other part of the DigitalRune libraries.

Appendix: Setting License Keys Using Assembly Attributes

The recommended way to set license keys is to simply call AddSerialNumber(String) at the beginning of the application, as described above.

But in certain usage cases this is not easily possible - for instance, in projects that have several possible entry points or in components that are dynamically loaded. In such cases it is possible to set license keys using assembly attributes.

To use this method, create a .NET attribute class that sets the license keys in its static constructor. For example:

C# Copy imageCopy
using System;

[AttributeUsage(AttributeTargets.Assembly)]
public class MyDigitalRuneLicenseAttribute : Attribute
{
  static MyDigitalRuneLicenseAttribute()
  {
    DigitalRune.Licensing.AddSerialNumber("NgAAALB9g24...DUOpXZDKjDG2eIDt7ncOo8=");   // 1st license key
    DigitalRune.Licensing.AddSerialNumber("NgAAALB9g24...DKldjg98öä0ßaaS=9");         // 2nd license key
    // ...
  }
}

Apply this attribute to the assembly that uses the DigitalRune libraries. For example:

C# Copy imageCopy
[assembly: MyDigitalRuneLicense]

See Also