Microsoft.CSharp.RuntimeBinder.Semantics.TypeArray.AssertValid C# (CSharp) Method

AssertValid() public method

public AssertValid ( ) : void
return void
        public void AssertValid()
        {
            Debug.Assert(size >= 0);
            for (int i = 0; i < size; i++)
            {
                Debug.Assert(_items[i] != null);
            }
        }
#endif

Usage Example

Esempio n. 1
0
        // Initializes a substitution context. Returns false iff no substitutions will ever be performed.
        private void Init(TypeArray typeArgsCls, TypeArray typeArgsMeth, SubstTypeFlags grfst)
        {
            if (typeArgsCls != null)
            {
                typeArgsCls.AssertValid();
                ctypeCls   = typeArgsCls.Count;
                prgtypeCls = typeArgsCls.Items;
            }
            else
            {
                ctypeCls   = 0;
                prgtypeCls = null;
            }

            if (typeArgsMeth != null)
            {
                typeArgsMeth.AssertValid();
                ctypeMeth   = typeArgsMeth.Count;
                prgtypeMeth = typeArgsMeth.Items;
            }
            else
            {
                ctypeMeth   = 0;
                prgtypeMeth = null;
            }

            this.grfst = grfst;
        }
All Usage Examples Of Microsoft.CSharp.RuntimeBinder.Semantics.TypeArray::AssertValid