コード例 #1
0
        /// <summary>
        /// Fix up a partial method by combining its defining and implementing declarations, updating the array of symbols (by name),
        /// and returning the combined symbol.
        /// </summary>
        /// <param name="symbols">The symbols array containing both the latent and implementing declaration</param>
        /// <param name="part1">One of the two declarations</param>
        /// <param name="part2">The other declaration</param>
        /// <returns>An updated symbols array containing only one method symbol representing the two parts</returns>
        private ImmutableArray <Symbol> FixPartialMember(ImmutableArray <Symbol> symbols, IPartialMemberSymbol part1, IPartialMemberSymbol part2)
        {
            IPartialMemberSymbol definition;
            IPartialMemberSymbol implementation;

            if (part1.IsPartialDefinition)
            {
                definition     = part1;
                implementation = part2;
            }
            else
            {
                definition     = part2;
                implementation = part1;
            }

            InitializePartialSymbolParts(definition, implementation);

            // a partial method is represented in the member list by its definition part:
            return(Remove(symbols, (Symbol)implementation));
        }
コード例 #2
0
 protected virtual void InitializePartialSymbolParts(IPartialMemberSymbol definition, IPartialMemberSymbol implementation)
 {
     throw new NotImplementedException("TODO:MetaDslx");
     //definition.OtherPartOfPartial = implementation;
     //implementation.OtherPartOfPartial = definition;
 }