示例#1
0
 //^ requires template.ContainingBlock != containingBlock;
 //^ ensures this.containingBlock == containingBlock;
 /// <summary>
 /// A copy constructor that allocates an instance that is the same as the given template, except for its containing block.
 /// </summary>
 /// <param name="containingBlock">A new value for containing block. This replaces template.ContainingBlock in the resulting copy of template.</param>
 /// <param name="template">The template to copy.</param>
 private VccNamedTypeExpression(BlockStatement containingBlock, VccNamedTypeExpression template)
     : base(containingBlock, template)
 {
     this.silentlyResolveToVoid = template.silentlyResolveToVoid;
 }
示例#2
0
 /*?*/
 private static VccStructuredTypeDeclaration MiniResolve(NamespaceDeclaration nsDeclaration, VccNamedTypeExpression/*?*/ typeExp)
 {
     if (nsDeclaration == null) return null;
       if (typeExp == null) return null;
       SimpleName/*?*/ typeName = typeExp.Expression as SimpleName;
       if (typeName == null) return null;
       int typeNameUniqueKey = typeName.Name.UniqueKey;
       foreach (VccStructuredTypeDeclaration typeDecl in
     IteratorHelper.GetFilterEnumerable<INamespaceDeclarationMember, VccStructuredTypeDeclaration>(nsDeclaration.Members)) {
     if (typeDecl.Name.UniqueKey == typeNameUniqueKey) return typeDecl;
       }
       return null;
 }