ThrowIsNull() публичный статический Метод

Throws ArgumentNullException when value is null.
public static ThrowIsNull ( object value, string paramName ) : void
value object test object.
paramName string parameter name for ArgumentNullException.
Результат void
Пример #1
0
        public ReferenceEventArgs(IVsHierarchy hierarchy, uint itemId, VSLangProj.Reference reference)
        {
            ErrorHelper.ThrowIsNull(hierarchy, nameof(hierarchy));

            Hierarchy = hierarchy;
            ItemId    = itemId;
            Reference = reference;
        }
Пример #2
0
        public HierarchyItemEventArgs(IVsHierarchy hierarchy, uint itemId, string fileName)
        {
            ErrorHelper.ThrowIsNull(hierarchy, nameof(hierarchy));
            ErrorHelper.ThrowIsNullOrEmpty(fileName, nameof(fileName));

            Hierarchy = hierarchy;
            ItemId    = itemId;
            FileName  = fileName;
        }
Пример #3
0
            public WindowFrameInfo(IVsWindowFrame windowFrame, RunningDocTableEvents runningDocTableEvents)
            {
                ErrorHelper.ThrowIsNull(windowFrame, nameof(windowFrame));
                ThreadHelper.ThrowIfNotOnUIThread();

                _runningDocTableEvents = runningDocTableEvents;
                OnScreen    = true;
                WindowFrame = windowFrame;
#pragma warning disable VSSDK002 // Visual Studio service should be used on main thread explicitly.
                var windowFrame2 = (IVsWindowFrame2)windowFrame;
                ErrorHelper.ThrowOnFailure(windowFrame2.Advise(this, out _cookie));
#pragma warning restore VSSDK002 // Visual Studio service should be used on main thread explicitly.
                _runningDocTableEvents.OnDocumentWindowOnScreenChanged(this, true);
            }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HierarchyListener"/> class.
 /// </summary>
 /// <param name="hierarchy">The hierarchy.</param>
 public HierarchyListener(IVsHierarchy hierarchy)
 {
     ErrorHelper.ThrowIsNull(hierarchy, nameof(hierarchy));
     Hierarchy = hierarchy;
 }