Class: Msf::Util::DotNetDeserialization::Assemblies::StrongName

Inherits:
Object
  • Object
show all
Defined in:
lib/msf/util/dot_net_deserialization/assemblies.rb

Overview

see:

* https://docs.microsoft.com/en-us/dotnet/standard/assembly/
* https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/versions-and-dependencies
* https://docs.microsoft.com/en-us/dotnet/standard/assembly/reference-strong-named

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, version, public_key_token, culture: 'neutral') ⇒ StrongName

Returns a new instance of StrongName.



11
12
13
14
15
16
# File 'lib/msf/util/dot_net_deserialization/assemblies.rb', line 11

def initialize(name, version, public_key_token, culture: 'neutral')
  @name = name
  @version = version
  @public_key_token = public_key_token
  @culture = culture
end

Instance Attribute Details

#cultureObject (readonly)

Returns the value of attribute culture.



18
19
20
# File 'lib/msf/util/dot_net_deserialization/assemblies.rb', line 18

def culture
  @culture
end

#nameObject (readonly)

Returns the value of attribute name.



18
19
20
# File 'lib/msf/util/dot_net_deserialization/assemblies.rb', line 18

def name
  @name
end

#public_key_tokenObject (readonly)

Returns the value of attribute public_key_token.



18
19
20
# File 'lib/msf/util/dot_net_deserialization/assemblies.rb', line 18

def public_key_token
  @public_key_token
end

#versionObject (readonly)

Returns the value of attribute version.



18
19
20
# File 'lib/msf/util/dot_net_deserialization/assemblies.rb', line 18

def version
  @version
end

Instance Method Details

#[](type_name) ⇒ Object



24
25
26
# File 'lib/msf/util/dot_net_deserialization/assemblies.rb', line 24

def [](type_name)
  QualifiedName.new(type_name, self)
end

#to_sObject



20
21
22
# File 'lib/msf/util/dot_net_deserialization/assemblies.rb', line 20

def to_s
  "#{name}, Version=#{version}, Culture=#{culture}, PublicKeyToken=#{public_key_token}"
end