/// <summary>
 /// Initializes a new instance of the <see cref="ClassContext"/> class.
 /// </summary>
 /// <param name="class">
 /// The class.
 /// </param>
 /// <param name="fullyQualifiedNameCache">
 /// The fully qualified name cache.
 /// </param>
 public ClassContext(ClassBase @class, FullyQualifiedNamesCache fullyQualifiedNameCache)
 {
     this.@class = @class;
     this.namespaceNode = fullyQualifiedNameCache.FindNamespaceNodeFromRoot(this.Class.FullyQualifiedName);
     //Debug.Assert(this.namespaceNode != null);
 }
        // todo: on Dictionary<string, object> it didn't return Namespace node, find out why
        // because there is no namespace System
        private void CalculateProperties()
        {
            var fullName = this.GetFullyQualifiedNameForBuiltInTypes(this.namesResolver.IsPlatformUsedInUsingDirectives);

            //this.isMethodParameterName = false;
            //if (this.namesResolver.CurrentParameters != null)
            //{
            //    this.isMethodParameterName = this.namesResolver.CurrentParameters.Any(p => p.Name == this.type);
            //}

            //if (!this.isMethodParameterName)
            //{
                this.codeElement = null;
                this.@namespace = null;

                var namespaceTypeName = this.GetNamespaceTypeName(fullName);
                var mappedValue = this.GetMappedTypeName(namespaceTypeName);

                this.NamespaceNode = this.namesResolver.FindNamespaceNode(mappedValue);
                if (this.NamespaceNode != null)
                {
                    this.codeElement = this.NamespaceNode.CodeElement;
                    this.@namespace = this.NamespaceNode.FullNamespace;
                }
            //}

            if (this.NamespaceNode != null)
            {
                this.type = this.GetTypeNameOnly(this.type);
            }

            // Debug.Assert(found, "Can't find type");
            this.ConvertCSharpTypeToCxTypeAndSetIsReference(this.namesResolver.IsPlatformUsedInUsingDirectives);
        }