pub fn import<P, N>(namespace: P, name: N) -> Import
Expand description
The import of a C# type using System.IO;
.
ยงExamples
use genco::prelude::*;
let a = csharp::import("Foo.Bar", "A");
let b = csharp::import("Foo.Bar", "B");
let ob = csharp::import("Foo.Baz", "B");
let toks: Tokens<Csharp> = quote! {
$a
$b
$ob
};
assert_eq!(
vec![
"using Foo.Bar;",
"",
"A",
"B",
"Foo.Baz.B",
],
toks.to_file_vec()?
);