title: How to get a IStereotype reference in a T4 Template?
body: <p>Is there a way to get a reference to Microsoft.VisualStudio.Uml.Profiles.IStereotype interface in a t4 template? I mean IStereotype that stores the definition of the UML stereotype, and not IStereotypeInstance that holds the actual value.
  I tried something like this, but the ApplicableStereotypes enumereation is empty.</p>
  
  <pre><code>void WriteClassAttributes( IClass classItem )
  {
      foreach( IStereotypeInstance stereoInst in classItem.AppliedStereotypes )
      {
          this.WriteLine( string.Format( "{0} = {1}", stereoInst.Profile, stereoInst.Name ) );
      }
      foreach( IStereotype stereo in classItem.ApplicableStereotypes )
      {
          this.WriteLine( string.Format( "{0} = {1}", stereo.Profile.Name, stereo.Name ) );
      }
  }
  </code></pre>
  
  <p>I tried to get IStereotype from ModelStore. But ProfileManager property always returns null and the code breaks.</p>
  
  <pre><code>string GetDefaultValue( IStereotypePropertyInstance stereoProp )
  {
      IModelStore modelStore = stereoProp.GetModelStore();
      Microsoft.VisualStudio.Uml.Profiles.IProfile profile =
          modelStore.ProfileManager.GetProfileByName( profileName );
  
      foreach( IStereotype stereo in profile.Stereotypes )
      {
          if( stereo.Name == stereoProp.StereotypeInstance.Name  )
          {
              return stereo.DefaultValue;
          }
      }
  }
  </code></pre>
  
  <p>I'm stucked. Please help!</p>