Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xamarin/NRefactory.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorDaniel Grunwald <daniel@danielgrunwald.de>2010-10-09 23:30:05 +0400
committerDaniel Grunwald <daniel@danielgrunwald.de>2010-10-09 23:30:05 +0400
commitb46cfa7e299077f69fb1118dfb997b0c7f99d3fa (patch)
tree69acd0fdfa995eb37cc0380b1d09af4d0d1b1c58 /README
parent8792c243cbec2fcbd8c0dd074e43a14a026ce0c9 (diff)
Added CastTests.
Constant folding: fixed implicit conversions and casts to use C# semantics
Diffstat (limited to 'README')
-rw-r--r--README18
1 files changed, 18 insertions, 0 deletions
diff --git a/README b/README
index 8d4c1ba8..efd004bb 100644
--- a/README
+++ b/README
@@ -8,3 +8,21 @@ ICSharpCode.NRefactory.TypeSystem.Implementation:
ICSharpCode.NRefactory.CSharp.Dom:
Abstract Syntax Tree for C#
+
+ICSharpCode.NRefactory.CSharp.Resolver:
+ Semantic analysis for C#
+
+Null-Object pattern:
+ The NRefactory library makes extensive use of the null object pattern.
+ As a reult, NullReferenceExceptions should be very rare when working with this library.
+ In the type system, both ITypeReference and IType use SharedTypes.UnknownType to represent unknown types.
+ Unless the method is documented otherwise, no method or property returning a ITypeReference or IType will return null.
+ When adding to this library, to try to keep such uses of null rare.
+
+ Note that the null object pattern is not used for ITypeDefinition:
+ IProjectContent.GetClass() returns null when a type is not found. Take care to abort your operation or substitute UnknownType
+ instead of passing the null to code expecting an IType.
+
+ The pattern also extends to the C# resolver, which always produces a ResolveResult, even in error cases.
+ Use ResolveResult.IsError to detect resolver errors. Also note that many resolver errors still have a meaningful type attached,
+ this allows code completion to work in the presence of minor semantic errors.