NetType: NetType class

Description Properties Active bindings Methods Examples

Description

NetType provide the name and namespace of a .Net type

Properties

Active bindings

Name

.Net type name.

Namespace

namespace of .Net type.

FullName

.Net type name

Methods

Public methods


Method new()

Create a new NetType object.

Usage
NetType$new(namespace, name)
Arguments
namespace

Namespace namespace of .Net type.

name

.Net type name.


Method createObject()

Create a new .Net object and wrap it.

Usage
NetType$createObject(...)
Arguments
...

Ctor arguments of the .Net type


Method clone()

The objects of this class are cloneable with this method.

Usage
NetType$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
library(sharper)
package_folder <- path.package("sharper")
netLoadAssembly(file.path(package_folder, "tests", "AssemblyForTests.dll"))

netType <- NetType$new("AssemblyForTests", "ManyCtorData")
print(sprintf("Name=%s, Namespace=%s, FullName=%s", 
  netType$Name, netType$Namespace, netType$FullName))

object <- netType$createObject(21L)
object$get("Id")

## End(Not run)

fdieulle/sharper documentation built on Aug. 1, 2020, 4:19 p.m.