コード例 #1
0
ファイル: UvssParser.cs プロジェクト: prshreshtha/ultraviolet
        /// <summary>
        /// Consumes a sequence of tokens representing a storyboard target filter.
        /// </summary>
        /// <param name="state">The parser state.</param>
        /// <returns>A new <see cref="UvssStoryboardTargetFilter"/> object representing the filter that was consumed.</returns>
        private static UvssStoryboardTargetFilter ConsumeStoryboardTargetFilter(UvssParserState state)
        {
            AdvanceBeyondWhiteSpaceOrFail(state);

            var filter = new UvssStoryboardTargetFilter();

            if (state.CurrentToken.TokenType != UvssLexerTokenType.Identifier)
            {
                filter.Add("FrameworkElement");
            }
            else
            {
                while (state.CurrentToken.TokenType == UvssLexerTokenType.Identifier)
                {
                    if (state.IsPastEndOfStream)
                        ThrowUnexpectedEOF(state);

                    var type = state.CurrentToken.Value;
                    filter.Add(type);

                    state.Consume();
                    state.AdvanceBeyondWhiteSpace();
                }
            }

            return filter;
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UvssStoryboardTarget"/> class.
 /// </summary>
 /// <param name="selector">The target's selector.</param>
 /// <param name="filter">The storyboard target's type filter.</param>
 /// <param name="animations">The target's collection of animations.</param>
 internal UvssStoryboardTarget(UvssSelector selector, UvssStoryboardTargetFilter filter, UvssStoryboardAnimationCollection animations)
 {
     this.selector   = selector;
     this.filter     = filter;
     this.animations = animations;
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UvssStoryboardTarget"/> class.
 /// </summary>
 /// <param name="selector">The target's selector.</param>
 /// <param name="filter">The storyboard target's type filter.</param>
 /// <param name="animations">The target's collection of animations.</param>
 internal UvssStoryboardTarget(UvssSelector selector, UvssStoryboardTargetFilter filter, UvssStoryboardAnimationCollection animations)
 {
     this.selector   = selector;
     this.filter     = filter;
     this.animations = animations;
 }