Hi all, so now we have DataObject.Net 4.6 and changes for the KeyGenerator but again no documentation :/
So I get this message:
Domain build failed:
Service with name "MyKeyGenerator" of type 'KeyGenerator' is not available.
Code:
[Service(typeof(MyKeyGenerator), Name = "MyKeyGenerator")]
public sealed class MyKeyGenerator: KeyGenerator
{
/// <summary>
/// Generates new key for the specified <paramref name="keyInfo"/>.
/// </summary>
/// <param name="keyInfo"><see cref="T:Xtensive.Orm.Model.KeyInfo"/> that defines key to generate.</param>
/// <param name="session">Current session.</param>
/// <returns>
/// Generated key value.
/// </returns>
public override Xtensive.Tuples.Tuple GenerateKey(Xtensive.Orm.Model.KeyInfo keyInfo, Session session)
{
return Xtensive.Tuples.Tuple.Create(Guid.NewGuid().ToString().ToUpper());
}
/// <summary>
/// Initializes key generator instance in the specified <paramref name="ownerDomain"/>.
/// Only keys that have specified <paramref name="keyTupleDescriptor"/> will be requested.
/// </summary>
/// <param name="ownerDomain">Domain to use.</param>
/// <param name="keyTupleDescriptor">Tuple descriptor of requested keys.</param>
public override void Initialize(Domain ownerDomain, Xtensive.Tuples.TupleDescriptor keyTupleDescriptor)
{
//Nothing to do here??
}
}
The previous KeyGenerator worked fine and now the new KeyGenerator has some new methods to be implemented but they don't make sense to me and I do not know how to get it to work now.
Some clues on how to use the new KeyGenerator class would be very nice! :)
Cheers! Jos
answered
Oct 18 '12 at 10:12
Jos
44●4●5●8