ThrowIsNull() public static method

Throws ArgumentNullException when value is null.
public static ThrowIsNull ( object value, string paramName ) : void
value object test object.
paramName string parameter name for ArgumentNullException.
return void
Exemplo n.º 1
0
        public ReferenceEventArgs(IVsHierarchy hierarchy, uint itemId, VSLangProj.Reference reference)
        {
            ErrorHelper.ThrowIsNull(hierarchy, nameof(hierarchy));

            Hierarchy = hierarchy;
            ItemId    = itemId;
            Reference = reference;
        }
Exemplo n.º 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;
        }
Exemplo n.º 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);
            }
Exemplo n.º 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;
 }