본문 바로가기

.Net

(31)
[Open Source] PUSHSHARP 소개 (C#) PUSHSHARP - PUSH 를 위한 C# 라이브러리 입니다. - https://github.com/Redth/PushSharp PushSharp push객체 (공통) //Create our push services broker var push = new PushBroker(); //Wire up the events for all the services that the broker registers push.OnNotificationSent += NotificationSent; push.OnChannelException += ChannelException; push.OnServiceException += ServiceException; push.OnNotificationFailed += Notifica..
[Server] GCM 전송 및 결과 처리 ( c#) GCM 전송 및 결과 처리 #region ANDROID 전송 // 안드로이드 전송 후 결과를 저장합니다. MobilePushResponseModel responseModel = new MobilePushResponseModel(); MobilePushResponseModel resultModel = new MobilePushResponseModel() { results = new List()}; foreach (var data in makeMessageForAndroid(message, AndroidPushList, locationUrl)) { responseModel = new MobilePushResponseModel (); responseModel = new JavaScriptSerializer (..
[Server] GCM 메세지 만들기 및 전송 (C#) GCM 메세지를 만듭니다. /// GCM 전송 메세지를 만듭니다. /// /// /// /// /// public string makeMessageForAndroid( string message, string deviceId, string locationUrl) { StringBuilder requestData = new StringBuilder(); requestData.Append( "{" ); requestData.Append( " \"registration_ids\": [ \"" ).Append(deviceId).Append( "\" ]"); requestData.Append( ", \"data\": {" ); requestData.Append( " \"message\": \"" ).Append(..
[Server] GCM 전송 Request 및 Response 분석 (C#) 요약 - 결과 1. 유효하지 않은 registration_ids 이나 해당 단말기가 최종적으로 다시 어플을 설치하여 정상 push를 받을 수 있는 경우 여기서 "32" 값은 다시 어플을 설치하여 정상 push를 받을수 있는 registration_ids 이다. : { "message_id": "1:2342", "registration_id": "32" } 2. 유효하지 않은 registration_ids 이면서 해당 단말기에 어플을 삭제 후 설치하지 않은 경우 : { "error": "NotRegistered"} 3. 유효한 registration_ids 인경우 : { "message_id": "1:1516" } 4. GCM에 정상 발송하지 못해 재전송이 필요한경우 : { "error": "Unavail..
How Can I trim all elements in a list? How Can I trim all elements in a list? String strCommaString = "aa, bb, cc, dd"; Response.Write("before Trim result"); Response.Write(" "); IList strListBeforeTrim = strCommaString.Split(',').ToArray(); foreach (var item in strListBeforeTrim) { Response.Write("[" + item + "]"); } Response.Write(" "); Response.Write("after Trim result"); Response.Write(" "); IList strListAfterTrim = strCommaStrin..
모노프로젝트 설치 및 문제 해결 1. 필수 소프트웨어 설치 yum -y install httpd httpd-devel make glib2-devel libpng-devel libjpeg-devel giflib-devel libtiff-devel libX11-devel gcc* fontconfig-devel bison gettext bzip2 libtool automake autoconf wget unzip 2. 다운로드 - 2014-04-09 현재 최신버전 다운로드 -- mono : Mono is a free and open source project led by Xamarin (formerly by Novell and originally by Ximian) to create an Ecma standard-compliant, .NET ..
Mono Project 1. Mono Project 모노(Mono)는 C# 컴파일러와 공통 언어 런타임을 필두로 하는 Ecma 표준 및 닷넷 프레임워크 호환 도구를 개발하는 자유 및 오픈 소스 계획으로 현재 노벨에서 이 계획을 지휘하고 있다. 모노는 리눅스, BSD, Mac OS X, 오픈솔라리스를 필두로 하는 다양한 유닉스 계 운영체제에서 이용할 수 있으며 윈도에서도 이용할 수 있다. 사실 마이크로소프트에서 이미 FreeBSD와 Mac OS X에서 실행할 수 있는 Shared Source CLI(코드명 Rotor)라는 .NET 호환 오픈 소스 툴을 내놓은 바 있으나, 마이크로소프트에서 이 툴에 적용한 허가서에 상업적 사용을 금한다는 조항이 있어 이 툴은 오픈 소스이기는 하나 자유 소프트웨어는 아니다. 2004-06-30 : ..
WebForm TextBox 숫자 only 입력하기 ## WebForm TextBox 숫자 only 입력하기 ##### 1. pure javascript 방식 Sample - - 2. JQuery 방식 Sample - -