/////////////////////////////////////////////////////////////////////// // AttribDef.h - demonstrates how to create {Developer] attribute // // // // Jim Fawcett, CSE681 - Software Modeling and Analysis, Fall 2004 // /////////////////////////////////////////////////////////////////////// // Build Process: // // Required Files: // AttribDef.h, AttribDef.cpp, Stdafx.h, Stdafx.h, // AssemblyInfo.cpp // // To Build: // right click on project and select build ///////////////////////////////////////////////////////////////////// #pragma once using namespace System; using namespace System::Reflection; namespace AttribDef { // - creates [Developer(developerName)] attribute // - puts developer's name in assembly's metadata [AttributeUsage(AttributeTargets::All)] public ref class DeveloperAttribute : public Attribute { public: DeveloperAttribute(String^ name) : m_Name(name) {} property String^ Developer { String^ get() { return m_Name; } } private: String^ m_Name; }; }