forked from nikhilk/scriptsharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScriptReference.cs
More file actions
66 lines (54 loc) · 1.41 KB
/
Copy pathScriptReference.cs
File metadata and controls
66 lines (54 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// ScriptReference.cs
// Script#/Core/Compiler
// This source code is subject to terms and conditions of the Apache License, Version 2.0.
//
using System;
using System.Diagnostics;
namespace ScriptSharp {
public sealed class ScriptReference {
private string _name;
private string _identifier;
private string _path;
private bool _delayLoaded;
public ScriptReference(string name, string identifier) {
Debug.Assert(String.IsNullOrEmpty(name) == false);
Debug.Assert((identifier == null) || (identifier.Length != 0));
_name = name;
_identifier = identifier;
}
public bool DelayLoaded {
get {
return _delayLoaded;
}
set {
_delayLoaded = value;
}
}
public bool HasIdentifier {
get {
return _identifier != null;
}
}
public string Identifier {
get {
return _identifier ?? _name;
}
set {
_identifier = value;
}
}
public string Name {
get {
return _name;
}
}
public string Path {
get {
return _path ?? _name;
}
set {
_path = value;
}
}
}
}