public override Object Visit(FieldAccessExpression node, Object obj) { node.Expression.Accept(this, obj); node.FieldName.Accept(this, obj); // * If the first name is a namespace, then the result could be... NameSpaceType nst = node.Expression.ExpressionType as NameSpaceType; if (nst != null) { // * ... another namepace or ... nst = nst.concat(node.FieldName.Identifier); // * ... a class TypeExpression userType = TypeTable.Instance.GetType(nst.Name, node.Location); if (userType != null) { // The class node.ExpressionType = userType; } else // The namespace { node.ExpressionType = nst; } // * We notify the following visitors that the type has been inferred in the type definition node.TypeInferredInVisitorTypeDefinition = true; } return(null); }
internal static string ToSerializedValue(this NameSpaceType value) { switch (value) { case NameSpaceType.Messaging: return("Messaging"); case NameSpaceType.NotificationHub: return("NotificationHub"); case NameSpaceType.Mixed: return("Mixed"); case NameSpaceType.EventHub: return("EventHub"); case NameSpaceType.Relay: return("Relay"); } return(null); }
/// <summary> /// Initializes a new instance of the SBNamespaceMigrate class. /// </summary> /// <param name="targetNamespaceType">Type of namespaces. Possible /// values include: 'Messaging', 'NotificationHub', 'Mixed', /// 'EventHub', 'Relay'</param> public SBNamespaceMigrate(NameSpaceType targetNamespaceType) { TargetNamespaceType = targetNamespaceType; CustomInit(); }