Source/NFX/Templatization/TemplateCompiler.cs
/// <summary>
/// Generates unique identifier suitable for use in code per compiler instance
/// </summary>
Generates unique identifier suitable for use in code per compiler instance
Generates unique identifier suitable for use in code per compiler instance
public string GenerateUniqueName()
         {
           while(true)
           {
             var name = string.Format("id_{0}_template_{1}", m_Rnd.Next(100000), Math.Abs(this.GetType().FullName.GetHashCode() % 1000));
             if (!m_UniqueNames.Contains(name))
             {
               m_UniqueNames.Add(name);
               return name;
             }
           }
         }
public string GenerateUniqueName ( ) { while ( true ) { var name = string . Format ( " " , m_Rnd . Next ( 100000 ) , Math . Abs ( this . GetType ( ) . FullName . GetHashCode ( ) % 1000 ) ) ; if ( ! m_UniqueNames . Contains ( name ) ) { m_UniqueNames . Add ( name ) ; return name ; } } }
Generates unique identifier suitable for use in code per compiler instance
Generates unique identifier suitable for use in code per compiler instance