GetCommandBuffers() private method

private GetCommandBuffers ( CameraEvent evt ) : UnityEngine.Rendering.CommandBuffer[]
evt CameraEvent
return UnityEngine.Rendering.CommandBuffer[]
 static public int GetCommandBuffers(IntPtr l)
 {
     try {
         UnityEngine.Camera self = (UnityEngine.Camera)checkSelf(l);
         UnityEngine.Rendering.CameraEvent a1;
         checkEnum(l, 2, out a1);
         var ret = self.GetCommandBuffers(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
    private static bool HasCommandBuffer(Camera setCamera, CameraEvent evt, string name) {
        foreach (var buf in setCamera.GetCommandBuffers(evt)) {
            if (buf.name == name) {
                return true;
            }
        }

        return false;
    }
	public void RefreshComBufs(Camera cam, bool isSceneCam) {
		if (cam && combufPreLight!=null && combufPostLight!=null) {
            CommandBuffer[] combufsPreLight = cam.GetCommandBuffers(CameraEvent.BeforeReflections);
            bool found = false;
            foreach (CommandBuffer cbuf in combufsPreLight)
            {
                // instance comparison below DOESN'T work !!! Well, weird isn't it ???
                //if (cbuf == combufPreLight)
                if (cbuf.name == combufPreLight.name)
                {
                    // got it already in command buffers
                    found = true;
                    break;
                }
            }
            if (!found)
            {
                cam.AddCommandBuffer(CameraEvent.BeforeReflections, combufPreLight);
                cam.AddCommandBuffer(CameraEvent.AfterLighting, combufPostLight);
                if (isSceneCam)
                {
                    sceneCamsWithBuffer.Add(cam);
                }
            }
		}
	}