xtd 0.2.0
assembly_version_attribute.h
Go to the documentation of this file.
1 #pragma once
4 #include "../attribute.h"
5 
8 #if !defined(__XTD_ASSEMBLY_VERSION__)
9 # define __XTD_ASSEMBLY_VERSION__ "1.0.0"
10 #endif
11 
14 namespace xtd {
16  namespace reflection {
30  class core_export_ assembly_version_attribute final : public xtd::attribute {
31  public:
37 
40  assembly_version_attribute(const ustring& version, const object& executing_assembly);
42 
46  const ustring& version() const noexcept;
48 
49  protected:
50  std::shared_ptr<object> get_type_id() const noexcept override;
51 
52  private:
53  ustring version_;
54  };
55  }
56 }
57 
59 std::shared_ptr<xtd::reflection::assembly_version_attribute>& __assembly_version_attribute__();
61 
75 #define assembly_version_(version) \
76  xtd::reflection::assembly_version_attribute __assembly_version_attribute {xtd::ustring(version) == "" || xtd::ustring(version) == "*" ? __XTD_ASSEMBLY_VERSION__ : version, xtd::object()}
Represents the base class for custom attributes.
Definition: attribute.h:23
Specifies the version of the assembly being attributed.
Definition: assembly_version_attribute.h:30
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
Represents the version number of an assembly, operating system, or the xtd. This class cannot be inhe...
Definition: version.h:95