مطالب
first chance exception چیست؟
چند سال قبل یک datapicker تقویم شمسی را برای سیلورلایت تهیه کردم. بعد از آن نسخه‌ی WPF آن هم به پروژه اضافه شد. تا اینکه مدتی قبل مشکل عدم کار کردن آن در یک صفحه‌ی دیالوگ جدید در ویندوز 8 گزارش شد. در حین برطرف کردن این مشکل، مدام سطر ذیل در پنجره‌ی output ویژوال استودیو نمایش داده می‌شد:
 A first chance exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll
البته برنامه بدون مشکل کار می‌کرد و صفحه‌ی نمایش Exception در VS.NET ظاهر نمی‌شد.


سؤال: first chance exception چیست؟

وقتی استثنایی در یک برنامه رخ می‌دهد، به آن یک first chance exception می‌گویند. این اولین شانسی است که سیستم به شما می‌دهد تا استثنای رخ داده را مدیریت کنید. اگر کدهای برنامه یا ابزاری (یک try/catch یا دیباگر) این اولین شانس را ندید بگیرند، یک second chance exception رخ می‌دهد. این‌جا است که برنامه به احتمال زیاد خاتمه خواهد یافت.
مشاهده‌ی پیام‌های A first chance exception در پنجره‌ی output ویژوال استودیو به این معنا است که استثنایی رخ داده، اما توسط یک استثناءگردان مدیریت شده‌است. بنابراین در اکثر موارد، موضوع خاصی نیست و می‌توان از آن صرفنظر کرد.


سؤال: چگونه می‌توان منشاء اصلی پیام رخ‌دادن یک first chance exception را یافت؟

ویژوال استودیو در پنجره‌ی output، مدام پیام رخ‌دادن first chance exception را نمایش می‌دهد؛ اما واقعا کدام قطعه از کدهای برنامه سبب بروز آن شده‌اند؟ به صورت پیش فرض صفحه‌ی نمایش استثناءها در VS.NET زمانی نمایان می‌شود که استثنای رخ داده، مدیریت نشده باشد. برای فعال سازی نمایش استثناهای مدیریت شده باید تنظیمات ذیل را اعمال کرد:
- به منوی Debug | Exceptions مراجعه کنید.
- گره Common Language Runtime Exceptions را باز کنید.
- سپس گروه System آن‌را نیز باز کنید.
- در اینجا بر اساس نوع استثنایی که در پنجره‌ی output نمایش داده می‌شود، آن استثناء را یافته و Thrown آن‌را انتخاب کنید.


اینبار اگر برنامه را اجرا کنید، دقیقا محلی که سبب بروز استثنای ArgumentOutOfRangeException شده در VS.NET گزارش داده خواهد شد.
اشتراک‌ها
شرکت در نظرسنجی رسمی NuGet

We are looking to learn more about your experience with NuGet.org to understand how we can make it better. This survey will take about 5 minutes of your time. Sharing your feedback here gives you an opportunity to help us prioritize the next set of investments and influence the direction of NuGet.  

شرکت در نظرسنجی رسمی NuGet
اشتراک‌ها
داستان خلق vue.js از زبان Evan You

I What began as a side project of a Google developer
now shares the JS leaderboard with #React and #Angular With the help of Sarah Drasner, Taylor Otwell, Thorsten Lünborg and many others from the Vue.js community, Evan You tells the story of how he fought against the odds to bring #Vuejs to life

داستان خلق vue.js از زبان Evan You
اشتراک‌ها
بررسی NET Standard.

Description

There has been a lot of talk lately about .NET Standard, both in the community and on Channel 9. But there is also still confusion about it. In this episode, Kathleen Dollard clears up some of this confusion. She and Robert chat about why .NET Standard was created, as well as how and when you should take advantage of it.  

بررسی NET Standard.
اشتراک‌ها
سایت Learn OpenGL

he focus of the tutorials are on Modern OpenGL. Learning (and using) modern OpenGL requires a strong knowledge of graphics programming and how OpenGL operates under the hood to really get the best of your experience. So we will start by discussing core graphi 

سایت Learn OpenGL
اشتراک‌ها
نگاهی به Entity Framework 7 چندسکویی

In this short video Nate shows us how to use Entity Framework 7 in a cross platform way (on a mac in this case). One of the guiding principles (as outlined by Rowan in an earlier video) was the ability to use EF7 on any kind of device. This video shows the culmination of that work.

نگاهی به Entity Framework 7 چندسکویی
فایل‌های پروژه‌ها
PdfRpt-2.0.zip
- Fixed conflicts of default footer's font and default document's font.
- Added an optional parameter to DocumentPreferences.BackgroundImage method to specify the absolute position of the background's image.
- Enabled running in medium trust environment.
- Added PageTableAdded event. PageTableAdded Fires after each part of the MainTable has been added to the current page.
- Added CustomSummaryPerPagePdfReport sample to show how to use PageTableAdded event.

بازخوردهای دوره
مدیریت نگاشت ConnectionIdها در SignalR به کاربران واقعی سیستم
مطابق مطلب فوق باید ConnectionId‌های او را یافته و به آن‌ها پیام ارسال کنید. روش مدیریت و جمع آوری این ConnectionId‌ها با مثالی در اینجا بحث شده.
به صورت خلاصه باید تناظری را بین مشخصات کاربر لاگین شده به سیستم یا Context.User.Identity.Name و تمام Context.ConnectionId او برقرار کرد.
بعد با داشتن لیستی از
ConnectionId‌های متناظر (ConcurrentDictionary مثال فوق)، می‌توان به کاربر خاصی پیام ارسال کرد. در این دیکشنری، به ازای یک Context.User.Identity.Name (مشخصات کاربر لاگین شده)، لیست Idهای اتصال او موجود است.
بعد برای ارسال پیام
به یک اتصال:
      Clients.Client(someConnectionId).sayhello("....");
ارسال پیام به چند اتصال، یا لیستی از ConnectionId ها:
Clients.Clients(connectionIdsList).sayhello("....");
نظرات اشتراک‌ها
GitHub هم ایران را تحریم کرد
گویا نظر GitHub، در مورد ایران تغییر کرده، اون پیام تحریم برداشته شده و امکان حذف مخزن رو دارم ولی مخزن خصوصی نمیشه ساخت.