Tip:Windows Phone-익명 형식 과 MethodAccessException
:
이상 코드:
fb.PostAsync("oauth/access_token",new
{
client_id = AppId,
client_secret = AppSecret,
redirect_uri = RedirectUri,
code = oauthResult.Code
});
이상 원인:익명 형식 은 internal 구성원 으로 컴 파일 되 며,크로스 프로그램 에 접근 할 때 이 이상 을 만 날 수 있 습 니 다.
해결 방법:익명 형식의 프로그램 집합 Assembly Info.cs 에서 다음 과 같은 기능 을 사용 할 수 있 습 니 다.
foreach (var propertyInfo in parameters.GetType().GetProperties())
{
if (!propertyInfo.CanRead) continue;
dictionary[propertyInfo.Name] = propertyInfo.GetValue(parameters, null);
}
참고:
http://stackoverflow.com/questions/8273399/anonymous-types-and-get-accessors-on-wp7-1
http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.internalsvisibletoattribute.aspx
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
제한된 크기의 디렉토리를 만드는 방법오늘 저는 장치에 공간이 없을 때 백업 중에 응용 프로그램이 어떻게 작동하는지 테스트(및 수정)하는 작업이 있습니다. 결과적으로 "남은 공간 없음"오류로 백업이 실패하면 새 파일이 없어야 합니다. 지금까지 문제를 재...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.