NHibernate has managed code to do this in the GuidCombGenerator.
Cross platform Sequential GUID
質問
I'm in the process of making one of my distributed c# .net libraries cross platform so I can deploy it to linux via mono and have come across an issue: I use a sequential GUID for generating ID's like this:
[DllImport("rpcrt4.dll", SetLastError = true)]
public static extern int UuidCreateSequential(out Guid guid);
This is obviously only good on a Windows platform.
Should I just forget about the sequential guid creation bit on linux and use a random guid? or does anyone have any suggestions on how I can replace the DllImport with something more appropriate?
解決
所属していません StackOverflow