[Mono-list] about guid
Steve Lessard
s_lessard at yahoo.com
Mon Aug 30 00:36:12 EDT 2010
Robert wrote: "the algorithms behind MS' implementation are not
well documented."
Are you talking about the algorithms for and implementation of Type.GUID, or are
you talking about the algorithms for and implementation of UUID / GUID
generation in general? Why wouldn't an RFC4122-compliant implementation would
not be acceptable?
________________________________
From: Robert Jordan <robertj at gmx.net>
To: Mono-list at lists.ximian.com
Sent: Sun, August 15, 2010 7:20:06 AM
Subject: Re: [Mono-list] about guid
On 15.08.2010 14:30, Feng Su wrote:
> I compile a file to a assembly. I find the Guids of all classes is
> 00000000-0000-0000-0000-000000000000.
> How can generate the different Guids for these classes?
You can manually apply a GuidAttribute to these classes, something
like that:
using System;
using System.Runtime.InteropServices;
[Guid("7ADF8247-2749-447E-890C-47BC7B42999F")]
class Program
{
static void Main ()
{
Console.WriteLine (typeof(Program).GUID);
}
}
Automatic Type.GUIDs are not implemented in Mono, mostly
because the algorithms behind MS' implementation are not well
documented.
Robert
_______________________________________________
Mono-list maillist - Mono-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20100829/b22f685d/attachment.html
More information about the Mono-list
mailing list