diff --git a/src/main/java/com/dbnt/faisp/config/FileController.java b/src/main/java/com/dbnt/faisp/config/FileController.java index d22e2af5..bc002467 100644 --- a/src/main/java/com/dbnt/faisp/config/FileController.java +++ b/src/main/java/com/dbnt/faisp/config/FileController.java @@ -1,23 +1,35 @@ package com.dbnt.faisp.config; import com.dbnt.faisp.main.faRpt.service.FaRptService; +import com.dbnt.faisp.main.faStatistics.crackdownsStatus.service.FishingBoatService; +import com.dbnt.faisp.main.faStatistics.crackdownsStatus.service.SailorService; import com.dbnt.faisp.main.fpiMgt.affair.service.AffairService; import com.dbnt.faisp.main.fpiMgt.affairPlan.service.PlanService; import com.dbnt.faisp.main.fpiMgt.affairResult.service.ResultService; import com.dbnt.faisp.main.ivsgtMgt.boardInvestigation.service.BoardInvestigationService; import com.dbnt.faisp.main.publicBoard.service.PublicBoardService; import lombok.RequiredArgsConstructor; +import org.springframework.core.io.FileSystemResource; +import org.springframework.core.io.Resource; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; import org.springframework.util.FileCopyUtils; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.*; import java.net.URLEncoder; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; @RestController @RequiredArgsConstructor +@RequestMapping("/file") public class FileController { private final FaRptService faRptService; @@ -26,13 +38,55 @@ public class FileController { private final AffairService affairService; private final ResultService resultService; private final BoardInvestigationService boardInvestigationService; + private final FishingBoatService fishingBoatService; - @GetMapping("/file/fileDownload") + @GetMapping("/fileDisplay") + public ResponseEntity fileDisplay(HttpServletRequest request, + HttpServletResponse response, + String board, + Integer parentKey, + Integer fileSeq) { + FileInfo fileInfo = getFileInfo(board, parentKey, fileSeq); + String pathStr = fileInfo.getSavePath()+fileInfo.getConvNm(); + Resource resource = new FileSystemResource(pathStr); + if(!resource.exists()){ + return new ResponseEntity<>(HttpStatus.NOT_FOUND); + } + HttpHeaders header = new HttpHeaders(); + Path filePath = null; + try { + filePath = Paths.get(pathStr); + header.add("Content-type", Files.probeContentType(filePath)); + }catch (IOException e){ + e.printStackTrace(); + } + return new ResponseEntity(resource, header, HttpStatus.OK); + } + @GetMapping("/fileDownload") public void fileDownload(HttpServletRequest request, HttpServletResponse response, String board, Integer parentKey, Integer fileSeq) { + + FileInfo fileInfo = getFileInfo(board, parentKey, fileSeq); + BufferedInputStream in; + BufferedOutputStream out; + try { + File file = new File(fileInfo.getSavePath(), fileInfo.getConvNm()); + + setDisposition(fileInfo.getFullName(), request, response); + in = new BufferedInputStream(new FileInputStream(file)); + out = new BufferedOutputStream(response.getOutputStream()); + FileCopyUtils.copy(in, out); + out.flush(); + if(out!=null) out.close(); + if(in!=null )in.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + private FileInfo getFileInfo(String board, Integer parentKey, Integer fileSeq){ FileInfo downloadFile = null; switch (board){ case "faRpt": @@ -53,23 +107,11 @@ public class FileController { case "ivsgt": downloadFile = boardInvestigationService.selectIvsgtFile(parentKey, fileSeq); break; + case "sailor": + downloadFile = fishingBoatService.selectSailorFile(parentKey, fileSeq); + break; } - - BufferedInputStream in; - BufferedOutputStream out; - try { - File file = new File(downloadFile.getSavePath(), downloadFile.getConvNm()); - - setDisposition(downloadFile.getFullName(), request, response); - in = new BufferedInputStream(new FileInputStream(file)); - out = new BufferedOutputStream(response.getOutputStream()); - FileCopyUtils.copy(in, out); - out.flush(); - if(out!=null) out.close(); - if(in!=null )in.close(); - } catch (IOException e) { - e.printStackTrace(); - } + return downloadFile; } private void setDisposition(String filename, HttpServletRequest request, HttpServletResponse response) throws IOException { String browser = getBrowser(request); diff --git a/src/main/java/com/dbnt/faisp/config/SecurityConfig.java b/src/main/java/com/dbnt/faisp/config/SecurityConfig.java index c281ee13..0342a283 100644 --- a/src/main/java/com/dbnt/faisp/config/SecurityConfig.java +++ b/src/main/java/com/dbnt/faisp/config/SecurityConfig.java @@ -124,6 +124,9 @@ public class SecurityConfig{ .exceptionHandling() .accessDeniedHandler(accessDeniedHandler()) .authenticationEntryPoint(authenticationEntryPoint()); + // 나모 에디터 'X-Frame-Options' to 'DENY' 오류로 인하여 추가. + // https://computer-science-student.tistory.com/497 + http.headers().frameOptions().sameOrigin(); return http.build(); } diff --git a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/FishingBoatController.java b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/FishingBoatController.java index accb2861..6674b2b1 100644 --- a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/FishingBoatController.java +++ b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/FishingBoatController.java @@ -10,10 +10,8 @@ import com.dbnt.faisp.main.faStatistics.crackdownsStatus.service.FishingBoatServ import com.dbnt.faisp.main.userInfo.model.UserInfo; import lombok.RequiredArgsConstructor; import org.springframework.security.core.annotation.AuthenticationPrincipal; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartHttpServletRequest; import org.springframework.web.servlet.ModelAndView; import java.time.LocalDateTime; @@ -96,8 +94,10 @@ public class FishingBoatController { } @PostMapping("/saveFishingBoat") - public Integer saveFishingBoat(@AuthenticationPrincipal UserInfo loginUser, CrackdownStatus crackdownStatus){ - return fishingBoatService.saveCrackdownStatus(crackdownStatus); + public Integer saveFishingBoat(@AuthenticationPrincipal UserInfo loginUser, + CrackdownStatus crackdownStatus, + MultipartHttpServletRequest request){ + return fishingBoatService.saveCrackdownStatus(crackdownStatus, request.getMultiFileMap().get("uploadFiles")); } @GetMapping("/checkCaseNum") diff --git a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/CaptinPhotoVersion.java b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/CaptinPhotoVersion.java new file mode 100644 index 00000000..df2f7af4 --- /dev/null +++ b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/CaptinPhotoVersion.java @@ -0,0 +1,58 @@ +package com.dbnt.faisp.main.faStatistics.crackdownsStatus.model; + +import com.dbnt.faisp.config.FileInfo; +import lombok.*; +import org.hibernate.annotations.DynamicInsert; +import org.hibernate.annotations.DynamicUpdate; + +import javax.persistence.*; +import java.io.Serializable; + +@Getter +@Setter +@Entity +@NoArgsConstructor +@DynamicInsert +@DynamicUpdate +@IdClass(CaptinPhotoVersion.CaptinPhotoVersionId.class) +@Table(name = "captin_photo_version") +public class CaptinPhotoVersion extends FileInfo { + @Id + @Column(name = "sailor_key") + private Integer sailorKey; + + @Id + @Column(name = "file_seq") + private Integer fileSeq; + + @Id + @Column(name = "version_no") + private Integer versionNo; + + @Column(name = "orig_nm") + private String origNm; + + @Column(name = "conv_nm") + private String convNm; + + @Column(name = "file_extn") + private String fileExtn; + + @Column(name = "file_size") + private String fileSize; + + @Column(name = "save_path") + private String savePath; + + + @Embeddable + @Data + @NoArgsConstructor + @AllArgsConstructor + public static class CaptinPhotoVersionId implements Serializable { + private Integer sailorKey; + private Integer fileSeq; + private Integer versionNo; + } + +} diff --git a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/fishingBoat/FishingBoat.java b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/fishingBoat/FishingBoat.java index ea14dce8..5212315e 100644 --- a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/fishingBoat/FishingBoat.java +++ b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/fishingBoat/FishingBoat.java @@ -1,15 +1,12 @@ package com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat; -import com.dbnt.faisp.config.BaseModel; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicUpdate; -import org.springframework.format.annotation.DateTimeFormat; import javax.persistence.*; -import java.time.LocalDateTime; @Getter @Setter diff --git a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/sailor/Sailor.java b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/sailor/Sailor.java index 205a722b..12643742 100644 --- a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/sailor/Sailor.java +++ b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/sailor/Sailor.java @@ -1,5 +1,6 @@ package com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.sailor; +import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.CaptinPhotoFile; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatus; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.FishingBoat; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.Violation; @@ -56,4 +57,7 @@ public class Sailor extends SailorBaseEntity { private String boatNameKr; @Transient private LocalDateTime napoDt; + + @Transient + private List fileList; } diff --git a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/sailor/SailorBaseEntity.java b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/sailor/SailorBaseEntity.java index 1cefa7b4..1ec13c5c 100644 --- a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/sailor/SailorBaseEntity.java +++ b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/sailor/SailorBaseEntity.java @@ -83,4 +83,5 @@ public class SailorBaseEntity extends BaseModel { @Column(name = "wrt_dt") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") private LocalDateTime wrtDt; + } diff --git a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/sailor/SailorVersion.java b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/sailor/SailorVersion.java index 4dea001f..527cc08f 100644 --- a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/sailor/SailorVersion.java +++ b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/model/sailor/SailorVersion.java @@ -1,5 +1,7 @@ package com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.sailor; +import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.CaptinPhotoFile; +import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.CaptinPhotoVersion; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatus; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.FishingBoat; import lombok.*; @@ -8,6 +10,7 @@ import org.hibernate.annotations.DynamicUpdate; import javax.persistence.*; import java.io.Serializable; +import java.util.List; @Getter @Setter @@ -49,4 +52,7 @@ public class SailorVersion extends SailorBaseEntity { private CrackdownStatus crackdownStatus; @Transient private FishingBoat fishingBoat; + + @Transient + private List fileList; } diff --git a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/repository/CaptionPhotoFileRepository.java b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/repository/CaptionPhotoFileRepository.java index 75e28ba5..fcb10355 100644 --- a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/repository/CaptionPhotoFileRepository.java +++ b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/repository/CaptionPhotoFileRepository.java @@ -3,6 +3,9 @@ package com.dbnt.faisp.main.faStatistics.crackdownsStatus.repository; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.CaptinPhotoFile; import org.springframework.data.jpa.repository.JpaRepository; +import java.util.List; + public interface CaptionPhotoFileRepository extends JpaRepository { + List findBySailorKeyOrderByFileSeqAsc(Integer sailorKey); } diff --git a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/repository/CaptionPhotoVersionRepository.java b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/repository/CaptionPhotoVersionRepository.java new file mode 100644 index 00000000..4192d3ff --- /dev/null +++ b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/repository/CaptionPhotoVersionRepository.java @@ -0,0 +1,8 @@ +package com.dbnt.faisp.main.faStatistics.crackdownsStatus.repository; + +import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.CaptinPhotoVersion; +import org.springframework.data.jpa.repository.JpaRepository; + +public interface CaptionPhotoVersionRepository extends JpaRepository { + +} diff --git a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/service/FishingBoatService.java b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/service/FishingBoatService.java index 60bc1a39..c625d1f2 100644 --- a/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/service/FishingBoatService.java +++ b/src/main/java/com/dbnt/faisp/main/faStatistics/crackdownsStatus/service/FishingBoatService.java @@ -2,7 +2,10 @@ package com.dbnt.faisp.main.faStatistics.crackdownsStatus.service; import com.dbnt.faisp.config.BaseService; +import com.dbnt.faisp.config.FileInfo; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.mapper.CrackdownStatusMapper; +import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.CaptinPhotoFile; +import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.CaptinPhotoVersion; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatus; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus.CrackdownStatusVersion; import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.fishingBoat.FishingBoat; @@ -16,12 +19,16 @@ import com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.sailor.SailorVers import com.dbnt.faisp.main.faStatistics.crackdownsStatus.repository.*; import lombok.RequiredArgsConstructor; import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.multipart.MultipartFile; +import java.io.File; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; +import java.util.UUID; @Service @RequiredArgsConstructor @@ -38,6 +45,8 @@ public class FishingBoatService extends BaseService { private final ProcessResultVersionRepository processResultVersionRepository; private final SailorRepository sailorRepository; private final SailorVersionRepository sailorVersionRepository; + private final CaptionPhotoFileRepository captionPhotoFileRepository; + private final CaptionPhotoVersionRepository captionPhotoVersionRepository; public List selectFishingBoatList(CrackdownStatus crackdownStatus){ return crackdownStatusMapper.selectFishingBoatList(crackdownStatus); @@ -54,14 +63,17 @@ public class FishingBoatService extends BaseService { crackdownStatus.setViolationList(violationRepository.findByFbKey(crackdownStatus.getFishingBoat().getFbKey())); crackdownStatus.setSailorList(sailorRepository.findByFbKey(crackdownStatus.getFishingBoat().getFbKey())); for(Sailor sailor: crackdownStatus.getSailorList()){ - //첨부파일 ...? + if(sailor.getPosition().equals("POS001")){ + // 선장의 첨부파일 첨부 + sailor.setFileList(captionPhotoFileRepository.findBySailorKeyOrderByFileSeqAsc(sailor.getSailorKey())); + } } } return crackdownStatus; } @Transactional - public Integer saveCrackdownStatus(CrackdownStatus crackdownStatus) { + public Integer saveCrackdownStatus(CrackdownStatus crackdownStatus, List sailorFiles) { Integer cdsKey, fbKey; if (crackdownStatus.getCdsKey()==null || crackdownStatus.getCdsKey().equals(0)){ // 최초 등록시 단속현황, 처리현황, 선원정보를 같이 등록. @@ -106,19 +118,25 @@ public class FishingBoatService extends BaseService { processResultVersionRepository.save(processResultVersion); // 선원정보, 선원정보버전 저장. List sailorList = crackdownStatus.getSailorList(); - List sailorVersionList = new ArrayList<>(); - i = 1; for(Sailor sailor: sailorList){ - sailor.setSailorKey(i++); sailor.setFbKey(fbKey); SailorVersion sailorVersion = new SailorVersion(); + + Integer sailorKey = sailorRepository.save(sailor).getSailorKey(); + BeanUtils.copyProperties(sailor, sailorVersion); sailorVersion.setVersionNo(1); - sailorVersionList.add(sailorVersion); + sailorVersion.setSailorKey(sailorKey); + Integer versionNo = sailorVersionRepository.save(sailorVersion).getVersionNo(); + if(sailor.getPosition().equals("POS001")){ + //선장은 사진이 같이 업로드 됨. + if(sailorFiles.size()>0) { + saveCaptainPhoto(sailorKey, versionNo, sailorFiles); + } + } } - sailorRepository.saveAll(sailorList); - sailorVersionRepository.saveAll(sailorVersionList); + }else{ // 업데이트시에는 어선정보만 수정. cdsKey = crackdownStatus.getCdsKey(); @@ -160,8 +178,14 @@ public class FishingBoatService extends BaseService { return fishingBoat; } + public FileInfo selectSailorFile(Integer sailorKey, Integer fileSeq) { + return captionPhotoFileRepository.findById(new CaptinPhotoFile.CaptinPhotoFileId(sailorKey, fileSeq)).orElse(null); + } + private CrackdownStatus setWriteInfo(CrackdownStatus crackdownStatus){ FishingBoat fishingBoat = crackdownStatus.getFishingBoat(); + fishingBoat.setWrtDt(LocalDateTime.now()); + crackdownStatus.setWrtOrgan(fishingBoat.getWrtOrgan()); crackdownStatus.setWrtPart(fishingBoat.getWrtPart()); crackdownStatus.setWrtUserSeq(fishingBoat.getWrtUserSeq()); @@ -186,4 +210,32 @@ public class FishingBoatService extends BaseService { } return crackdownStatus; } + + @Value("${file.dir.sailor}") + protected String sailorPath; + + private void saveCaptainPhoto(Integer sailorKey, Integer versionNo, List fileList){ + int fileSeq = 1; + for(MultipartFile file : fileList){ + String saveName = UUID.randomUUID().toString(); + String path = locationPath+ File.separator+sailorPath+File.separator; + saveFile(file, new File(path+File.separator+saveName)); + + String originalFilename = file.getOriginalFilename(); + int extnIdx = originalFilename.lastIndexOf("."); + CaptinPhotoFile fileInfo = new CaptinPhotoFile(); + fileInfo.setSailorKey(sailorKey); + fileInfo.setFileSeq(fileSeq++); + fileInfo.setOrigNm(originalFilename.substring(0, extnIdx)); + fileInfo.setFileExtn(originalFilename.substring(extnIdx+1)); + fileInfo.setConvNm(saveName); + fileInfo.setFileSize(calculationSize(file.getSize())); + fileInfo.setSavePath(path); + CaptinPhotoVersion versionInfo = new CaptinPhotoVersion(); + BeanUtils.copyProperties(fileInfo, versionInfo); + versionInfo.setVersionNo(versionNo); + captionPhotoFileRepository.save(fileInfo); + captionPhotoVersionRepository.save(versionInfo); + } + } } diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties index 2067d302..99911818 100644 --- a/src/main/resources/application-dev.properties +++ b/src/main/resources/application-dev.properties @@ -11,6 +11,8 @@ file.dir=C:\\faispUploadFiles file.dir.vulnerable=/vulnerable file.dir.part=/part file.dir.equip=/equip +file.dir.sailor=sailor +file.dir.affair=affair #thymeleaf diff --git a/src/main/resources/static/CrossUploader/HowTo_CU(JSP).txt b/src/main/resources/static/CrossUploader/HowTo_CU(JSP).txt new file mode 100644 index 00000000..4bfc484e --- /dev/null +++ b/src/main/resources/static/CrossUploader/HowTo_CU(JSP).txt @@ -0,0 +1,11 @@ +NamoCrossUploader ġ + +Server + Ǯ WEB-INF jar ġϽð (NamoCrossUploaderJaSamples) ֽñ ٶϴ. + (NamoCrossUploaderJaSamples) Ͽ Ͻø ˴ϴ. + +Html5 + NamoCrossUploader_H5_Samples Ͽ ٿ ֽϴ. + (NamoCrossUploader_H5_Samples) ֽñ ٶϴ. + + amoCrossUploaderJaManua, NamoCrossUploaderH5Manuall ̵ Դϴ. \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/META-INF/MANIFEST.MF b/src/main/resources/static/CrossUploader/META-INF/MANIFEST.MF new file mode 100644 index 00000000..254272e1 --- /dev/null +++ b/src/main/resources/static/CrossUploader/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/common.css b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/common.css new file mode 100644 index 00000000..ecf5a43d --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/common.css @@ -0,0 +1,136 @@ +/* ----------------- COMMON (/)----------------- */ + +body { + padding:0; + font-family:굴림,Gulim,AppleGothic,sans-serif; + color:#626262; + font-size:12px; + line-height:18px; + background-position:left top; + background-repeat:repeat-x; + background-color:#FFFFFF; + + scrollbar-3dlight-color:C9C9C9; + scrollbar-arrow-color:C9C9C9; + scrollbar-base-color:F5F5F5; + scrollbar-darkshadow-color:FFFFFF; + scrollbar-face-color:F5F5F5; + scrollbar-highlight-color:FFFFF; + scrollbar-shadow-color:C9C9C9; +} + +/*html{overflow-y:scroll;}*/ +form {margin:0;} +img{border:0 none;} + + +a:link, a:visited{color:#3D3D3D; text-decoration:none;} +a:hover, a:active{color:#3D3D3D; text-decoration:underline;} + +h1 { font-family:굴림; font-size:24px; color:#485285; margin-left:0pt; line-height:150%; } +h2 { font-family:굴림; font-size:15px; color:#485285; margin-left:10pt; } +h3 { font-family:굴림; font-size:14px; color:#000066; margin-left:10pt; margin-top:30pt; } +h4 { font-family:굴림; font-size:12px; color:#000066; margin-left:10pt;} +h5 { font-family:굴림; font-size:12px; color:#4673A0; margin-left:10pt; margin-top:20pt; } +h6 { font-family:굴림; font-size:12px; color:#4673A0; margin-left:10pt; } + +div,p{font-family:굴림; font-size:12px; line-height:18px; padding:0; margin:0; border:0;} +th,td{font-family:굴림; font-size:12px; line-height:15px; padding:0; margin:0; border:0; } +ul,li,ol,dl,dt,dd{font-family:굴림; font-size:12px; line-height:18px; padding:0; margin:0; border:0;} +hr{padding:0; margin-top:30; border:1px; border-style:solid; border-color:#C2CDD4; border-bottom-color:#ffffff; } + + + +/* Tab & Button */ +.clearfix:after, +.btn-area:after {content:""; display:block; height:0; clear:both; visibility:hidden;} +.clearfix, .btn-area {} + +ul.navi-tab {clear:both; width:100%; margin:0px 0px 0px 0px; background:url('images/table_navi_bg.png') repeat-x left bottom;} +ul.navi-tab li {float:left; background:url('images/navibg_left.png') no-repeat left top; height:50px;} +ul.navi-tab li span {float:left; margin:0 0 0 45px; padding:15px 45px 10px 0; background:url('images/navibg_right.png') no-repeat right top; font-weight:bold; color:#8c7d70; word-spacing:-2px; height:50px;} +ul.navi-tab li.on {background:url('images/navibg_left_on.png') no-repeat left top; height:50px;} +ul.navi-tab li.on span {background:url('images/navibg_right_on.png') no-repeat right top; color:#282828;background-size:166px 50px;} +ul.navi-tab li span a:link, ul.navi-tab li span a:visited, ul.navi-tab li span a:active {color:#595959; text-decoration:none;} +ul.navi-tab li span a:hover {color:#282828; text-decoration:none;} + + + + +/***** Head *****/ +#head_title{background-image:url(images/header_bg.png); background-color:#FFFFFF;} +#h1_title{margin:0 auto; padding:0px 0 0 0; width:100%; height:43px; text-align:left;} +#h1_title h1{font-size:1px; text-decoration:none; text-indent:-10000px; padding:0;} +#h1_title h2{font-size:1px; text-decoration:none; text-indent:-10000px; padding:0;} +#h1_title.logo h1{float:left; width:216px; height:43px; background-image:url(images/title_bi.png);} +#h1_title.logo h2{float:right; width:200px; height:43px; background-image:url(images/title_ci.png);} + +#h1_title p{float:left; padding:0px 0px 0px 0px;} +#h1_title p img{cursor:pointer;} + +#head_menu{margin:0px 0px 0px 17px auto; height:30px; float:left;} + + + +/***** Tree *****/ +.ctbic { font-family:굴림,Arial; font-weight:bold; font-size:9pt; margin-top:15pt;} +.ctmid { font-family:굴림,Arial; font-weight:bold; font-size:9pt; margin-top:5pt; margin-bottom:0pt; margin-left:10pt;} +.ctsmall { font-family:굴림,Arial; font-size:9pt; margin-top:3pt; margin-bottom:0pt; margin-left:10pt;} +.ctsmall2 { font-family:굴림,Arial; font-size:9pt; margin-top:0pt; margin-bottom:0pt; margin-left:30pt; color:rgb(0,102,153);} + +/***** API Tree *****/ +.cu_obj_guide { font-family:굴림,Arial; font-weight:bold; font-size:9pt; margin-top:15pt;} +.cu_obj { font-family:굴림,Arial; font-weight:bold; font-size:9pt; margin-top:5pt; margin-bottom:0pt; margin-left:10pt;} +.cu_obj_api { font-family:굴림,Arial; font-weight:bold; font-size:9pt; margin-top:5pt; margin-bottom:0pt; margin-left:20pt;} +.cu_obj_api_name { font-family:굴림,Arial; font-size:9pt; margin-top:3pt; margin-bottom:0pt; margin-left:30pt;} + + +/***** Body *****/ +.mtitle_table { margin-left:10pt; margin-top:30pt; margin-bottom:9pt; border-width:1px; border-color:rgb(204,204,204); border-style:solid;} +.mtitle { font-family:굴림; font-weight:bold; font-size:12pt; } +.mtab { font-family:굴림; font-weight:bold; font-size:12pt; margin-left:20pt;} +.mtext { font-family:굴림; font-size:9pt; margin-left:10pt; margin-right:10pt; line-height:120%; margin-bottom:0pt; margin-bottom:10pt;} +.mlabel1 { font-family:굴림; font-weight:bold; font-size:9pt; color:rgb(51,102,153); margin-left:20pt;} +.mlabel2 { font-family:굴림; font-size:9pt; color:rgb(0,102,153);} +.mlabeltext { font-family:굴림; font-size:9pt; margin-left:20pt; line-height:150%; margin-top:0pt; margin-bottom:5pt;} +.msub { font-family:굴림; font-weight:bold; font-size:9pt; color:rgb(153,0,0); margin-left:20pt;} + + + + +/***** 관리자 도움말 API *****/ +p { font-family:굴림,Arial; font-size:9pt; } +li { font-family:굴림,Arial; font-size:9pt; } +dd { font-family:굴림,Arial; font-size:9pt; line-height:150%; } + +h1 { font-family:굴림,Arial, Verdana; font-size:16pt; color:rgb(72, 82, 133); } +h2 { font-family:바탕,Arial; font-size:14pt; color:blue; margin-left:20pt; } +h3 { font-family:굴림,Arial; font-size:12pt; color:rgb(70, 115, 160); margin-top:40pt; margin-left:20pt; } +h4 { font-family:굴림,Arial; font-size:11pt; color:blue; margin-left:20pt; margin-top:20pt; } +h5 { font-family:돋움,Arial; font-size:10pt; color:000066; margin-left:20pt; } +h6 { font-family:바탕,Arial; font-size:10pt; color:blue; margin-left:20pt; } + +.menu { font-family:돋움,Arial; font-size:9pt; color:rgb(0,102,153); } +.order { font-family: 굴림,Arial; font-size:9pt; color:rgb(153,153,153); } +td.border { border-width:1pt; border-color:rgb(153,153,153); border-style:solid; } + +.mtitle { font-family:굴림,Arial; font-weight:bold; font-size:14pt; } +.mtitle_table { margin-left:17pt; margin-top:30pt; margin-bottom:9pt; border-width:1px; border-color:rgb(204,204,204); border-style:solid;} +.mtab { font-family:굴림,Arial; font-size:9pt; margin-left:20pt; line-height:150%; margin-top:0pt; margin-bottom:5pt;} +.mtext { font-family:굴림,Arial; font-size:9pt; margin-left:20pt; line-height:150%; margin-top:0pt; margin-bottom:5pt;} +.mlabel1 { font-family:굴림,Arial; font-weight:bold; font-size:9pt; color:rgb(51,102,153); margin-left:20pt;} +.mlabel2 { font-family:굴림,Arial; font-size:9pt; color:rgb(0,102,153);} +.mlabeltext { font-family:굴림,Arial; font-size:9pt; margin-left:45pt; line-height:150%; margin-top:0pt; margin-bottom:5pt;} +.msub { font-family:굴림,Arial; font-weight:bold; font-size:9pt; color:rgb(153,0,0); margin-left:20pt;} + + +i { color:fuchsia; } + +body{ + scrollbar-3dlight-color:9B9B9B; + scrollbar-arrow-color:ffffff; + scrollbar-base-color:E2E2E2; + scrollbar-darkshadow-color:FFFFFF; + scrollbar-face-color:E2E2E2; + scrollbar-highlight-color:FFFFF; + scrollbar-shadow-color:9B9B9B} \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Events/onCancelUploadItem.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Events/onCancelUploadItem.html new file mode 100644 index 00000000..2249f5f5 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Events/onCancelUploadItem.html @@ -0,0 +1,102 @@ + + + + +onCancelUploadItem + + + + + + + + + + + + + +
+

BasicFileUploadManager

+
+

Events

+
+

 

+
+

 

+
+ + + + + +
+

onCancelUploadItem

+

개별 파일에 대한 업로드 취소 시 호출됩니다.

+

 

+

Syntax

+
    +
    void onCancelUploadItem ( String params )
    +
+

Parameters

+

params

+

[out] 취소된 파일정보로 JSON 타입의 String입니다.

+ +

 

+

Return Values

+

+

 

+

Remarks

+

+

 

+

Sample Codes

+

Javascript

+
+[namocrossuploader-config.js]
+(function (win) {
+
+    if (!location.origin)
+        location.origin = location.protocol + "//" + location.host;
+
+    var namoCrossUploaderEvents = new Object();
+    namoCrossUploaderEvents.onStartUpload = "onStartUploadCu";                // 업로드 시작 시 호출됩니다. 
+    namoCrossUploaderEvents.onStartUploadItem = "onStartUploadItemCu";        // 개별 파일에 대한 업로드 시작 시 호출됩니다. 
+    namoCrossUploaderEvents.onEndUploadItem = "onEndUploadItemCu";            // 개별 파일에 대한 업로드 완료 시 호출됩니다. 
+    namoCrossUploaderEvents.onEndUpload = "onEndUploadCu";                    // 업로드 완료 시 호출됩니다.
+    namoCrossUploaderEvents.onCloseMonitorWindow = "onCloseMonitorWindowCu";  // 전송창이 닫힐 때 호출됩니다.
+    namoCrossUploaderEvents.onCancelUploadItem = "onCancelUploadItemCu";      // 개별 파일에 대한 업로드 취소 시 호출됩니다.
+    namoCrossUploaderEvents.onException = "onExceptionCu";                    // 예외 발생 시 호출됩니다
+
+    win.namoCrossUploaderConfig = {
+
+        // 제품버전
+        version: "1.0.0.1",
+
+        // 제품경로 
+        productPath: location.origin + "/cu/NamoCrossUploader_jsp_H5_Samples/Samples/", 
+
+        // Event 이름 설정
+        eventNames: namoCrossUploaderEvents
+
+    };
+
+})(window);
+
+[UploadForm.html]
+/**
+* 개별 파일에 대한 업로드 취소 시 호출됩니다.
+*/
+var onCancelUploadItemCu = function (rowIndex) {
+	/*
+	var obj = jQuery.parseJSON(uploader.getFileInfoAt(rowIndex));
+	alert('[개별 파일에 대한 업로드 취소 정보]\n' +
+		'FileName : '				+ obj.fileName + '\n' +
+		'FileSize : '				+ obj.fileSize + '\n'
+	);
+	*/
+}
+
+

 

+
+ + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Events/onCloseMonitorWindow.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Events/onCloseMonitorWindow.html new file mode 100644 index 00000000..93566a44 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Events/onCloseMonitorWindow.html @@ -0,0 +1,111 @@ + + + +onCloseMonitorWindow + + + + + + + + + + + + + +
+

BasicFileUploadManager

+
+

Events

+
+

 

+
+

 

+
+ + + + + +
+

onCloseMonitorWindow

+

전송창이 닫힐 때 호출됩니다.

+

 

+

Syntax

+
    +
    void onCloseMonitorWindow ( )
    +
+

Parameters

+

+

+ +

 

+

Return Values

+

+

 

+

Remarks

+

+

 

+

Sample Codes

+

Javascript

+
+[namocrossuploader-config.js]
+/*
+ * NamoCrossUploader configuration file.
+ * Copyright NAMO Editor Inc.
+ */
+(function (win) {
+
+    if (!location.origin)
+        location.origin = location.protocol + "//" + location.host;
+
+    var namoCrossUploaderEvents = new Object();
+    namoCrossUploaderEvents.onStartUpload = "onStartUploadCu";                // 업로드 시작 시 호출됩니다. 
+    namoCrossUploaderEvents.onStartUploadItem = "onStartUploadItemCu";        // 개별 파일에 대한 업로드 시작 시 호출됩니다. 
+    namoCrossUploaderEvents.onEndUploadItem = "onEndUploadItemCu";            // 개별 파일에 대한 업로드 완료 시 호출됩니다. 
+    namoCrossUploaderEvents.onEndUpload = "onEndUploadCu";                    // 업로드 완료 시 호출됩니다.
+    namoCrossUploaderEvents.onCloseMonitorWindow = "onCloseMonitorWindowCu";  // 전송창이 닫힐 때 호출됩니다.
+    namoCrossUploaderEvents.onCancelUploadItem = "onCancelUploadItemCu";      // 개별 파일에 대한 업로드 취소 시 호출됩니다.
+    namoCrossUploaderEvents.onException = "onExceptionCu";                    // 예외 발생 시 호출됩니다
+
+    win.namoCrossUploaderConfig = {
+
+        // 제품버전
+        version: "1.0.0.1",
+
+        // 제품경로 
+        productPath: location.origin + "/cu/NamoCrossUploader_jsp_H5_Samples/Samples/", 
+
+        // Event 이름 설정
+        eventNames: namoCrossUploaderEvents
+
+    };
+
+})(window);
+
+[UploadForm.html]
+/**
+* 개별 파일에 대한 업로드 완료 시 호출됩니다.
+*/
+var onEndUploadItemCu = function (rowIndex) {
+	/*
+	var obj = jQuery.parseJSON(uploader.getFileInfoAt(rowIndex));
+	alert("[" + rowIndex + "번째 파일의 정보]\n" +
+		"FileType : " + obj.fileType + " (NORMAL:파일, UPLOADED:업로드된 파일)\n" +
+		"FileId : " + obj.fileId + "\n" +
+		"FileName : " + obj.fileName + "\n" +
+		"FileSize : " + obj.fileSize + "\n" +
+		"Status : " + obj.status + "\n" +
+		"IsDeleted : " + obj.isDeleted + "\n\n" +
+		"FileType, FileId, IsDeleted 게시판 수정모드에 활용되는 속성입니다."
+		);
+		*/
+}
+
+

+  

+
+ + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Events/onEndUpload.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Events/onEndUpload.html new file mode 100644 index 00000000..f9d06e24 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Events/onEndUpload.html @@ -0,0 +1,100 @@ + + + +onEndUpload + + + + + + + + + + + + + +
+

BasicFileUploadManager

+
+

Events

+
+

 

+
+

 

+
+ + + + + +
+

onEndUpload

+

업로드 완료 시 호출됩니다.

+

 

+

Syntax

+
    +
    void onEndUpload ( )
    +
+

Parameters

+

+

+ +

 

+

Return Values

+

+

 

+

Remarks

+

+

 

+

Sample Codes

+

Javascript

+
+[namocrossuploader-config.js]
+/*
+ * NamoCrossUploader configuration file.
+ * Copyright NAMO Editor Inc.
+ */
+(function (win) {
+
+    if (!location.origin)
+        location.origin = location.protocol + "//" + location.host;
+
+    var namoCrossUploaderEvents = new Object();
+    namoCrossUploaderEvents.onStartUpload = "onStartUploadCu";                // 업로드 시작 시 호출됩니다. 
+    namoCrossUploaderEvents.onStartUploadItem = "onStartUploadItemCu";        // 개별 파일에 대한 업로드 시작 시 호출됩니다. 
+    namoCrossUploaderEvents.onEndUploadItem = "onEndUploadItemCu";            // 개별 파일에 대한 업로드 완료 시 호출됩니다. 
+    namoCrossUploaderEvents.onEndUpload = "onEndUploadCu";                    // 업로드 완료 시 호출됩니다.
+    namoCrossUploaderEvents.onCloseMonitorWindow = "onCloseMonitorWindowCu";  // 전송창이 닫힐 때 호출됩니다.
+    namoCrossUploaderEvents.onCancelUploadItem = "onCancelUploadItemCu";      // 개별 파일에 대한 업로드 취소 시 호출됩니다.
+    namoCrossUploaderEvents.onException = "onExceptionCu";                    // 예외 발생 시 호출됩니다
+
+    win.namoCrossUploaderConfig = {
+
+        // 제품버전
+        version: "1.0.0.1",
+
+        // 제품경로 
+        productPath: location.origin + "/cu/NamoCrossUploader_jsp_H5_Samples/Samples/", 
+
+        // Event 이름 설정
+        eventNames: namoCrossUploaderEvents
+
+    };
+
+})(window);
+
+[UploadForm.html]
+/**
+* 업로드 완료 시 호출됩니다.
+*/
+var onEndUploadCu = function () {
+	// alert('업로드가 완료됐습니다.');
+}
+
+

+  

+
+ + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Events/onEndUploadItem.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Events/onEndUploadItem.html new file mode 100644 index 00000000..7686a91f --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Events/onEndUploadItem.html @@ -0,0 +1,111 @@ + + + + +onEndUploadItem + + + + + + + + + + + + + +
+

BasicFileUploadManager

+
+

Events

+
+

 

+
+

 

+
+ + + + + +
+

onEndUploadItem

+

개별 파일에 대한 업로드 완료 시 호출됩니다.

+

 

+

Syntax

+
    +
    void onEndUploadItem ( String params )
    +
+

Parameters

+

params

+

[out] 전송 완료된 파일정보로 JSON 타입의 String입니다.

+ +

 

+

Return Values

+

+

 

+

Remarks

+

+

 

+

Sample Codes

+

Javascript

+
+[namocrossuploader-config.js]
+/*
+ * NamoCrossUploader configuration file.
+ * Copyright NAMO Editor Inc.
+ */
+(function (win) {
+
+    if (!location.origin)
+        location.origin = location.protocol + "//" + location.host;
+
+    var namoCrossUploaderEvents = new Object();
+    namoCrossUploaderEvents.onStartUpload = "onStartUploadCu";                // 업로드 시작 시 호출됩니다. 
+    namoCrossUploaderEvents.onStartUploadItem = "onStartUploadItemCu";        // 개별 파일에 대한 업로드 시작 시 호출됩니다. 
+    namoCrossUploaderEvents.onEndUploadItem = "onEndUploadItemCu";            // 개별 파일에 대한 업로드 완료 시 호출됩니다. 
+    namoCrossUploaderEvents.onEndUpload = "onEndUploadCu";                    // 업로드 완료 시 호출됩니다.
+    namoCrossUploaderEvents.onCloseMonitorWindow = "onCloseMonitorWindowCu";  // 전송창이 닫힐 때 호출됩니다.
+    namoCrossUploaderEvents.onCancelUploadItem = "onCancelUploadItemCu";      // 개별 파일에 대한 업로드 취소 시 호출됩니다.
+    namoCrossUploaderEvents.onException = "onExceptionCu";                    // 예외 발생 시 호출됩니다
+
+    win.namoCrossUploaderConfig = {
+
+        // 제품버전
+        version: "1.0.0.1",
+
+        // 제품경로 
+        productPath: location.origin + "/cu/NamoCrossUploader_jsp_H5_Samples/Samples/", 
+
+        // Event 이름 설정
+        eventNames: namoCrossUploaderEvents
+
+    };
+
+})(window);
+
+[UploadForm.html]
+/**
+* 개별 파일에 대한 업로드 완료 시 호출됩니다.
+*/
+var onEndUploadItemCu = function (rowIndex) {
+	/*
+	var obj = jQuery.parseJSON(uploader.getFileInfoAt(rowIndex));
+	alert("[" + rowIndex + "번째 파일의 정보]\n" +
+		"FileType : " + obj.fileType + " (NORMAL:파일, UPLOADED:업로드된 파일)\n" +
+		"FileId : " + obj.fileId + "\n" +
+		"FileName : " + obj.fileName + "\n" +
+		"FileSize : " + obj.fileSize + "\n" +
+		"Status : " + obj.status + "\n" +
+		"IsDeleted : " + obj.isDeleted + "\n\n" +
+		"FileType, FileId, IsDeleted 게시판 수정모드에 활용되는 속성입니다."
+		);
+		*/
+}
+
+

 

+
+ + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Events/onException.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Events/onException.html new file mode 100644 index 00000000..b700f3c7 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Events/onException.html @@ -0,0 +1,113 @@ + + + + +onException + + + + + + + + + + + + + +
+

BasicFileUploadManager

+
+

Events

+
+

 

+
+

 

+
+ + + + + +
+

onException

+

예외 발생 시 호출됩니다.

+

 

+

Syntax

+
    +
    void onException ( String params )
    +
+

Parameters

+

params

+

[out] 예외정보로 JSON 타입의 String입니다.

+ +

 

+

Return Values

+

+

 

+

Remarks

+

+

 

+

Sample Codes

+

Javascript

+
+[namocrossuploader-config.js]
+/*
+ * NamoCrossUploader configuration file.
+ * Copyright NAMO Editor Inc.
+ */
+(function (win) {
+
+    if (!location.origin)
+        location.origin = location.protocol + "//" + location.host;
+
+    var namoCrossUploaderEvents = new Object();
+    namoCrossUploaderEvents.onStartUpload = "onStartUploadCu";                // 업로드 시작 시 호출됩니다. 
+    namoCrossUploaderEvents.onStartUploadItem = "onStartUploadItemCu";        // 개별 파일에 대한 업로드 시작 시 호출됩니다. 
+    namoCrossUploaderEvents.onEndUploadItem = "onEndUploadItemCu";            // 개별 파일에 대한 업로드 완료 시 호출됩니다.
+    namoCrossUploaderEvents.onEndUpload = "onEndUploadCu";                    // 업로드 완료 시 호출됩니다.
+    namoCrossUploaderEvents.onCloseMonitorWindow = "onCloseMonitorWindowCu";  // 전송창이 닫힐 때 호출됩니다.
+    namoCrossUploaderEvents.onCancelUploadItem = "onCancelUploadItemCu";      // 개별 파일에 대한 업로드 취소 시 호출됩니다.
+    namoCrossUploaderEvents.onException = "onExceptionCu";                    // 예외 발생 시 호출됩니다 
+
+    win.namoCrossUploaderConfig = {
+
+        // 제품버전
+        version: "1.0.0.1",
+
+        // 제품경로 
+        productPath: location.origin + "/cu/NamoCrossUploader_jsp_H5_Samples/Samples/", 
+
+        // Event 이름 설정
+        eventNames: namoCrossUploaderEvents
+
+    };
+
+})(window);
+
+[UploadForm.html]
+/**
+* 예외 발생 시 호출됩니다.
+*/
+var onExceptionCu = function () {
+	// 300~ : 일반적 예외
+	// 400~ : 시스템 예외
+	// 500~ : 서측에서 발생한 예외
+	// 필요한 예외정보만 고객에서 보여주십시오.
+	var exceptionInfo = uploader.getLastExceptionInfo();
+	var obj = jQuery.parseJSON(exceptionInfo);
+	alert('[예외 정보]\n' + 'code : ' + obj.code + '\n' + 'message : ' + obj.message + '\n' + 'detailMessage : ' + obj.detailMessage);
+
+	if (parseInt(obj.code, 10) > 400000) {
+		var uploadedFilesInfo = uploader.getUploadedFilesInfo();
+		document.dataForm.uploadedFilesInfo.value = uploadedFilesInfo;
+		document.dataForm.action = "ErrorProcess.jsp";
+		document.dataForm.submit();
+	}
+}
+
+

 

+
+ + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Events/onStartUpload.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Events/onStartUpload.html new file mode 100644 index 00000000..f58e8ef5 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Events/onStartUpload.html @@ -0,0 +1,101 @@ + + + +onStartUpload + + + + + + + + + + + + + +
+

BasicFileUploadManager

+
+

Events

+
+

 

+
+

 

+
+ + + + + +
+

onStartUpload

+

업로드 시작 시 호출됩니다.

+

 

+

Syntax

+
    +
    void onStartUpload ( )
    +
+

Parameters

+

+

+ +

 

+

Return Values

+

+

 

+

Remarks

+

+

 

+

Sample Codes

+

Javascript

+
+[namocrossuploader-config.js]
+/*
+ * NamoCrossUploader configuration file.
+ * Copyright NAMO Editor Inc.
+ */
+(function (win) {
+
+    if (!location.origin)
+        location.origin = location.protocol + "//" + location.host;
+
+    var namoCrossUploaderEvents = new Object();
+    namoCrossUploaderEvents.onStartUpload = "onStartUploadCu";                // 업로드 시작 시 호출됩니다. 
+    namoCrossUploaderEvents.onStartUploadItem = "onStartUploadItemCu";        // 개별 파일에 대한 업로드 시작 시 호출됩니다. 
+    namoCrossUploaderEvents.onEndUploadItem = "onEndUploadItemCu";            // 개별 파일에 대한 업로드 완료 시 호출됩니다. 
+    namoCrossUploaderEvents.onEndUpload = "onEndUploadCu";                    // 업로드 완료 시 호출됩니다.
+    namoCrossUploaderEvents.onCloseMonitorWindow = "onCloseMonitorWindowCu";  // 전송창이 닫힐 때 호출됩니다.
+    namoCrossUploaderEvents.onCancelUploadItem = "onCancelUploadItemCu";      // 개별 파일에 대한 업로드 취소 시 호출됩니다.
+    namoCrossUploaderEvents.onException = "onExceptionCu";                    // 예외 발생 시 호출됩니다
+
+    win.namoCrossUploaderConfig = {
+
+        // 제품버전
+        version: "1.0.0.1",
+
+        // 제품경로 
+        productPath: location.origin + "/cu/NamoCrossUploader_jsp_H5_Samples/Samples/", 
+
+        // Event 이름 설정
+        eventNames: namoCrossUploaderEvents
+
+    };
+
+})(window);
+
+[UploadForm.html]
+/**
+ * 사용자 정의 업로드
+ */
+var onStartUpload = function () {
+	//alert("onStartUpload : 업로드가 시적되었습니다.");
+	uploader.startUpload();
+}
+
+

+  

+
+ + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Events/onStartUploadItem.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Events/onStartUploadItem.html new file mode 100644 index 00000000..040903e1 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Events/onStartUploadItem.html @@ -0,0 +1,111 @@ + + + + +onStartUploadItem + + + + + + + + + + + + + +
+

BasicFileUploadManager

+
+

Events

+
+

 

+
+

 

+
+ + + + + +
+

onStartUploadItem

+

개별 파일에 대한 업로드 시작 시 호출됩니다.

+

 

+

Syntax

+
    +
    void onStartUploadItem ( String params )
    +
+

Parameters

+

params

+

[out] 전송 시작된 파일정보로 JSON 타입의 String입니다.

+ +

 

+

Return Values

+

+

 

+

Remarks

+

+

 

+

Sample Codes

+

Javascript

+
+[namocrossuploader-config.js]
+/*
+ * NamoCrossUploader configuration file.
+ * Copyright NAMO Editor Inc.
+ */
+(function (win) {
+
+    if (!location.origin)
+        location.origin = location.protocol + "//" + location.host;
+
+    var namoCrossUploaderEvents = new Object();
+    namoCrossUploaderEvents.onStartUpload = "onStartUploadCu";                // 업로드 시작 시 호출됩니다.
+    namoCrossUploaderEvents.onStartUploadItem = "onStartUploadItemCu";        // 개별 파일에 대한 업로드 시작 시 호출됩니다.  
+    namoCrossUploaderEvents.onEndUploadItem = "onEndUploadItemCu";            // 개별 파일에 대한 업로드 완료 시 호출됩니다. 
+    namoCrossUploaderEvents.onEndUpload = "onEndUploadCu";                    // 업로드 완료 시 호출됩니다.
+    namoCrossUploaderEvents.onCloseMonitorWindow = "onCloseMonitorWindowCu";  // 전송창이 닫힐 때 호출됩니다.
+    namoCrossUploaderEvents.onCancelUploadItem = "onCancelUploadItemCu";      // 개별 파일에 대한 업로드 취소 시 호출됩니다.
+    namoCrossUploaderEvents.onException = "onExceptionCu";                    // 예외 발생 시 호출됩니다
+
+    win.namoCrossUploaderConfig = {
+
+        // 제품버전
+        version: "1.0.0.1",
+
+        // 제품경로 
+        productPath: location.origin + "/cu/NamoCrossUploader_jsp_H5_Samples/Samples/", 
+
+        // Event 이름 설정
+        eventNames: namoCrossUploaderEvents
+
+    };
+
+})(window);
+
+[UploadForm.html]
+/**
+* 개별 파일에 대한 업로드 시작 시 호출됩니다.
+*/
+var onStartUploadItemCu = function (rowIndex) {
+	/*
+	var obj = jQuery.parseJSON(uploader.getFileInfoAt(rowIndex));
+	alert("[" + rowIndex + "번째 파일의 정보]\n" +
+		"FileType : " + obj.fileType + " (NORMAL:파일, UPLOADED:업로드된 파일)\n" +
+		"FileId : " + obj.fileId + "\n" +
+		"FileName : " + obj.fileName + "\n" +
+		"FileSize : " + obj.fileSize + "\n" +
+		"Status : " + obj.status + "\n" +
+		"IsDeleted : " + obj.isDeleted + "\n\n" +
+		"FileType, FileId, IsDeleted 게시판 수정모드에 활용되는 속성입니다."
+		);
+	*/
+}
+
+

 

+
+ + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/addUploadedFile.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/addUploadedFile.html new file mode 100644 index 00000000..f36c47da --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/addUploadedFile.html @@ -0,0 +1,78 @@ + + + + +addUploadedFile + + + + + + + + + + + + + +
+

BasicFileUploadManager

+
+

Methods

+
+

 

+
+

 

+
+ + + + + +
+

addUploadedFile

+

게시판 수정모드시 기존에 업로드된 파일을 추가합니다.

+

 

+

Syntax

+
    +
    void addUploadedFile ( Object fileInfo )
    +
+

Parameters

+

fileInfo

+

[in] 기존에 업로드된 파일정보입니다. 파일정보는 fileId, fileName, fileSize 입니다.

+ +

 

+

Return Values

+

+

 

+

Remarks

+

+

 

+

Sample Codes

+

Javascript

+
+/**
+* NamoCrossUploader 객체를 생성합니다.
+*/
+var uploadUrl = 'UploadProcess.jsp';
+var managerProperties = new Object();
+
+    
+/**
+* 기존에 업로드 된 파일정보 추가
+*/
+for(var i=1; i<4; i++) {
+	var uploadedFileInfo = new Object();
+	uploadedFileInfo.fileId = 'FILEID_000' + i.toString();
+	uploadedFileInfo.fileName = '테스트 업로드 파일 0' + i.toString() + '.txt';
+	uploadedFileInfo.fileSize = '10240';
+	
+uploader.addUploadedFile(JSON.stringify(uploadedFileInfo));
+    
+}
+
+

 

+
+ + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/getModifiedFilesInfo.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/getModifiedFilesInfo.html new file mode 100644 index 00000000..e22aaa04 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/getModifiedFilesInfo.html @@ -0,0 +1,85 @@ + + + + +getModifiedFilesInfo + + + + + + + + + + + + + +
+

BasicFileUploadManager

+
+

Methods

+
+

 

+
+

 

+
+ + + + + +
+

getModifiedFilesInfo

+

게시판 수정모드시 addUploadedFile 메소드로 추가한 파일정보를 반환합니다.

+

 

+

Syntax

+
    +
    String getModifiedFilesInfo ( String type )
    +
+

Parameters

+

type

+

[in] 가져올 데이터 타입입니다.

+ +

 

+

Return Values

+

addUploadedFile 메소드로 추가한 파일정보를 String 타입으로 반환합니다.

+

 

+

Remarks

+

서버측에서 JSON 타입으로 반환했을 경우는 JSON 타입으로 가져오는 것을 권장하며, 그 외의 경우는 개별 파일 정보를 조합할 delimiter 문자(또는 문자열)를 입력해 주십시오.

+

 

+

Sample Codes

+

Javascript

+
+/**
+* 전송창이 닫힐 때 호출됩니다.
+*/
+var onCloseMonitorWindowCu = function () {
+	// 데이터 처리 페이지로 업로드 결과를 전송합니다.
+	// onEndUploadCu 나 onCloseMonitorWindowCu 이벤트 시점에 처리하시면 되며,
+	// onCloseMonitorWindowCu 시에는 getUploadStatus()를 호출하여 업로드 완료되어 있는지 체크해 주십시오.
+	if (uploader.getUploadStatus() == 'COMPLETION') {
+
+		// 업로드된 전체 파일의 정보를 가져옵니다.
+		var uploadedFilesInfo = uploader.getUploadedFilesInfo();
+		var modifiedFilesInfo = uploader.getModifiedFilesInfo(JSON); 
+		/**
+		* 필요 시, 아래처럼 사용해 주십시오. (JSON으로 넘오올 경우)
+		var obj = jQuery.parseJSON(uploadedFilesInfo);
+		alertTimeout(obj.length);
+		alertTimeout(obj[0].name);
+		*/
+		//alert(uploadedFilesInfo);
+		// 데이터 처리 페이지로 업로드 결과를 전송합니다.
+		document.dataForm.uploadedFilesInfo.value = uploadedFilesInfo;
+		document.dataForm.modifiedFilesInfo.value = modifiedFilesInfo; 
+	
+		document.dataForm.submit();
+	}
+}
+
+

 

+
+ + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/getTotalFileCount.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/getTotalFileCount.html new file mode 100644 index 00000000..5f50dac5 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/getTotalFileCount.html @@ -0,0 +1,83 @@ + + + + +getTotalFileCount + + + + + + + + + + + + + +
+

BasicFileUploadManager

+
+

Methods

+
+

 

+
+

 

+
+ + + + + +
+

getTotalFileCount

+

BasicFileUploadManager 객체에 추가된 전체 파일의 개수를 반환합니다.

+

 

+

Syntax

+
    +
    Number getTotalFileCount ()
    +
+

Parameters

+

+

+ +

 

+

Return Values

+

BasicFileUploadManager 객체에 추가된 전체 파일의 개수를 반환합니다.

+

 

+

Remarks

+

+

 

+

Sample Codes

+

Javascript

+
+/**
+* 파일의 정보를 가져옵니다. 
+*/
+var getFilesInfo = function () {
+	var totalFileCount = uploader.getTotalFileCount();
+	
+	if(totalFileCount == 0){
+		alert("파일이 목록에 없습니다.");
+	}else{
+
+		for (i = 0; i < totalFileCount; i++) {
+			var obj = jQuery.parseJSON(uploader.getFileInfoAt(i));
+			alert("[" + i + "번째 파일의 정보]\n" +
+				"fileType : " + obj.fileType + " (NORMAL:파일 UPLOADED:업로드된 파일)\n" +
+				"fileId : " + obj.fileId + "\n" +
+				"fileName : " + obj.fileName + "\n" +
+				"fileSize : " + obj.fileSize + "\n" +
+				"status : " + obj.status + "\n" +
+				"isDeleted : " + obj.isDeleted + "\n\n" +
+				"fileType, fileId, isDeleted 게시판 수정모드에 활용되는 속성입니다."
+				);
+		}
+	}
+}
+
+

 

+
+ + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/getUploadStatus.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/getUploadStatus.html new file mode 100644 index 00000000..839f4f8d --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/getUploadStatus.html @@ -0,0 +1,116 @@ + + + + +getUploadStatus + + + + + + + + + + + + + +
+

BasicFileUploadManager

+
+

Methods

+
+

 

+
+

 

+
+ + + + + +
+

getUploadStatus

+

업로드 상태를 반환합니다.

+

 

+

Syntax

+
    +
    String getUploadStatus ( )
    +
+

Parameters

+

+

+

 

+

Return Values

+

업로드 상태를 String 타입으로 반환합니다.

+

 

+ + + + + + + + + + + + + + + + + +
+

COMPLETE

+
+

전송 완료 상태입니다.

+
+

WAIT

+
+

전송 대기 상태입니다.

+
+

TRANSFER

+
+

전송 중 상태입니다.

+
+

FAILURE

+
+

전송 실패 상태입니다.

+
+

Remarks

+

+

 

+

Sample Codes

+

Javascript

+
+/**
+* 전송창이 닫힐 때 호출됩니다.
+*/
+var onCloseMonitorWindowCu = function () {
+	// 데이터 처리 페이지로 업로드 결과를 전송합니다.
+	// onEndUploadCu 나 onCloseMonitorWindowCu 이벤트 시점에 처리하시면 되며,
+	// onCloseMonitorWindowCu 시에는 getUploadStatus()를 호출하여 업로드 완료되어 있는지 체크해 주십시오.
+	if (uploader.getUploadStatus() == 'COMPLETION') {
+
+		// 업로드된 전체 파일의 정보를 가져옵니다.
+		var uploadedFilesInfo = uploader.getUploadedFilesInfo();
+
+		/**
+		* 필요 시, 아래처럼 사용해 주십시오. (JSON으로 넘오올 경우)
+		var obj = jQuery.parseJSON(uploadedFilesInfo);
+		alertTimeout(obj.length);
+		alertTimeout(obj[0].name);
+		*/
+
+		// 데이터 처리 페이지로 업로드 결과를 전송합니다.
+		document.dataForm.uploadedFilesInfo.value = uploadedFilesInfo;
+		document.dataForm.submit();
+	}
+}
+
+

 

+
+ + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/getUploadedFilesInfo.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/getUploadedFilesInfo.html new file mode 100644 index 00000000..53d0748e --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/getUploadedFilesInfo.html @@ -0,0 +1,83 @@ + + + + +getUploadedFilesInfo + + + + + + + + + + + + + +
+

BasicFileUploadManager

+
+

Methods

+
+

 

+
+

 

+
+ + + + + +
+

getUploadedFilesInfo

+

업로드된 전체 파일정보를 반환합니다.

+

 

+

Syntax

+
    +
    String getUploadedFilesInfo ( String type )
    +
+

Parameters

+

type

+

[in] 가져올 데이터 타입입니다.

+ +

 

+

Return Values

+

업로드된 전체 파일정보를 String 타입으로 반환합니다.

+

 

+

Remarks

+

서버측에서 JSON 타입으로 반환했을 경우는 JSON 타입으로 가져오는 것을 권장하며, 그 외의 경우는 개별 파일 정보를 조합할 delimiter 문자(또는 문자열)를 입력해 주십시오.

+

 

+

Sample Codes

+

Javascript

+
+/**
+* 전송창이 닫힐 때 호출됩니다.
+*/
+var onCloseMonitorWindowCu = function () {
+	// 데이터 처리 페이지로 업로드 결과를 전송합니다.
+	// onEndUploadCu 나 onCloseMonitorWindowCu 이벤트 시점에 처리하시면 되며,
+	// onCloseMonitorWindowCu 시에는 getUploadStatus()를 호출하여 업로드 완료되어 있는지 체크해 주십시오.
+	if (uploader.getUploadStatus() == 'COMPLETION') {
+
+		// 업로드된 전체 파일의 정보를 가져옵니다.
+		var uploadedFilesInfo = uploader.getUploadedFilesInfo();
+
+		/**
+		* 필요 시, 아래처럼 사용해 주십시오. (JSON으로 넘오올 경우)
+		var obj = jQuery.parseJSON(uploadedFilesInfo);
+		alertTimeout(obj.length);
+		alertTimeout(obj[0].name);
+		*/
+
+		// 데이터 처리 페이지로 업로드 결과를 전송합니다.
+		document.dataForm.uploadedFilesInfo.value = uploadedFilesInfo;
+		document.dataForm.submit();
+	}
+}
+
+

 

+
+ + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/setAllowedFileExtension.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/setAllowedFileExtension.html new file mode 100644 index 00000000..7c3d7584 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/setAllowedFileExtension.html @@ -0,0 +1,67 @@ + + + + +setAllowedFileExtension + + + + + + + + + + + + + +
+

BasicFileUploadManager

+
+

Methods

+
+

 

+
+

 

+
+ + + + + +
+

setAllowedFileExtension

+

파일 추가시 허용할 파일 확장자를 설정합니다.

+

 

+

Syntax

+
    +
    void setAllowedFileExtension ( String fileExtensions )
    +
+

Parameters

+

fileExtensions

+

[in] 파일 추가시 허용할 파일 확장자입니다. 파일 확장자를 세미콜론(;) 문자로 연결해서 입력해 주십시오.

+ +

 

+

Return Values

+

+

 

+

Remarks

+

+

 

+

Sample Codes

+

Javascript

+
+/**
+* 허용하지 않을 파일 확장자 설정
+* setFileFilter로 설정한 것과는 별개로, 실제 업로드 할 수 있는 확장자는 아래와 같이 제한됩니다. 
+*/
+uploader.setAllowedFileExtension('exe;cgi;sql', 'REVERSE'); 
+// 허용할 파일 확장자 기준으로 File Extension을 설정하려면 setAllowedFileExtension 메소드의 두번째 파라미터에 'FORWARD'를 입력해 주십시오.
+//uploader.setAllowedFileExtension('jpg;jpeg;txt', 'FORWARD');
+
+
+

 

+
+ + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/setFileFilter.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/setFileFilter.html new file mode 100644 index 00000000..47443ea6 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/setFileFilter.html @@ -0,0 +1,69 @@ + + + + +setFileFilter + + + + + + + + + + + + + +
+

BasicFileUploadManager

+
+

Methods

+
+

 

+
+

 

+
+ + + + + +
+

setFileFilter

+

파일 추가 대화상자의 파일 필터를 설정합니다.

+

 

+

Syntax

+
    +
    void setFileFilter ( Object Array fileFilter )
    +
+

Parameters

+

fileFilter

+

[in] 파일 추가 대화상자에 설정될 파일 필터 입니다.

+ +

 

+

Return Values

+

+

 

+

Remarks

+

+

 

+

Sample Codes

+

Javascript

+
+/**
+* 파일 필터 설정
+* 명시적 파일 확장자(.gif, .jpg, .png, .doc) 또는 아래와 같은 타입들을 콤마(,)로 연결하여 입력해 주십시오. 
+* - 'audio/*'	
+* - 'video/*'
+* - 'image/*'	
+* - 'media_type' 
+*/
+uploader.setFileFilter('.txt,.jpg,.jpeg');
+//uploader.setFileFilter('.txt,video/*');
+
+

 

+
+ + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/setMaxFileCount.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/setMaxFileCount.html new file mode 100644 index 00000000..3d9925d7 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/setMaxFileCount.html @@ -0,0 +1,65 @@ + + + + +setMaxFileCount + + + + + + + + + + + + + +
+

BasicFileUploadManager

+
+

Methods

+
+

 

+
+

 

+
+ + + + + +
+

setMaxFileCount

+

파일 추가시 허용할 최대 파일개수를 설정합니다.

+

 

+

Syntax

+
    +
    void setMaxFileCount ( Number maxFileCount )
    +
+

Parameters

+

maxFileCount

+

[in] 파일 추가시 허용할 최대 파일개수입니다.

+ +

 

+

Return Values

+

+

 

+

Remarks

+

+

 

+

Sample Codes

+

Javascript

+
+/**
+/* 파일 크기, 개수 제한
+*/ 
+uploader.setMaxFileCount(5);                    // 파일 개수 제한
+uploader.setMaxFileSize(1024 * 1024 * 5);       // 개별 파일 크기를 5MB로 제한
+uploader.setMaxTotalFileSize(1024 * 1024 * 10); // 전체 파일 크기를 10MB로 제한
+
+

 

+
+ + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/setMaxFileSize.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/setMaxFileSize.html new file mode 100644 index 00000000..1cebf067 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/setMaxFileSize.html @@ -0,0 +1,65 @@ + + + + +setMaxFileSize + + + + + + + + + + + + + +
+

BasicFileUploadManager

+
+

Methods

+
+

 

+
+

 

+
+ + + + + +
+

setMaxFileSize

+

파일 추가시 허용할 개별 파일의 최대 크기를 설정합니다.

+

 

+

Syntax

+
    +
    void setMaxFileSize ( Number maxFileSize )
    +
+

Parameters

+

maxFileSize

+

[in] 파일 추가시 허용할 개별 파일의 최대 크기입니다.

+ +

 

+

Return Values

+

+

 

+

Remarks

+

+

 

+

Sample Codes

+

Javascript

+
+/**
+/* 파일 크기, 개수 제한
+*/ 
+uploader.setMaxFileCount(5);                    // 파일 개수 제한
+uploader.setMaxFileSize(1024 * 1024 * 5);       // 개별 파일 크기를 5MB로 제한
+uploader.setMaxTotalFileSize(1024 * 1024 * 10); // 전체 파일 크기를 10MB로 제한
+
+

 

+
+ + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/setMaxTotalFileSize.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/setMaxTotalFileSize.html new file mode 100644 index 00000000..bd52bd26 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/setMaxTotalFileSize.html @@ -0,0 +1,65 @@ + + + + +setMaxTotalFileSize + + + + + + + + + + + + + +
+

BasicFileUploadManager

+
+

Methods

+
+

 

+
+

 

+
+ + + + + +
+

setMaxTotalFileSize

+

파일 추가시 허용할 전체 파일의 최대 크기를 설정합니다.

+

 

+

Syntax

+
    +
    void setMaxTotalFileSize ( Number maxTotalFileSize )
    +
+

Parameters

+

maxTotalFileSize

+

[in] 파일 추가시 허용할 전체 파일의 최대 크기입니다.

+ +

 

+

Return Values

+

+

 

+

Remarks

+

+

 

+

Sample Codes

+

Javascript

+
+/**
+/* 파일 크기, 개수 제한
+*/ 
+uploader.setMaxFileCount(5);                    // 파일 개수 제한
+uploader.setMaxFileSize(1024 * 1024 * 5);       // 개별 파일 크기를 5MB로 제한
+uploader.setMaxTotalFileSize(1024 * 1024 * 10); // 전체 파일 크기를 10MB로 제한
+
+

 

+
+ + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/setUploadURL.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/setUploadURL.html new file mode 100644 index 00000000..7f283ba2 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/setUploadURL.html @@ -0,0 +1,80 @@ + + + + +setUploadURL + + + + + + + + + + + + + +
+

BasicFileUploadManager

+
+

Methods

+
+

 

+
+

 

+
+ + + + + +
+

setUploadURL

+

파일 업로드 URL을 설정합니다.

+

 

+

Syntax

+
    +
    void setUploadURL ( String uploadURL )
    +
+

Parameters

+

uploadURL

+

[in] 파일 업로드 URL입니다.

+ +

 

+

Return Values

+

+

 

+

Remarks

+

+

 

+

Sample Codes

+

Javascript

+
+/**
+* NamoCrossUploader 객체를 생성합니다.
+*/
+var uploadUrl = 'UploadProcess.jsp';
+var managerProperties = new Object();
+managerProperties.width = '436';                    // FileUploadManager 너비
+managerProperties.height = '280';                   // FileUploadManager 높이
+managerProperties.containerId = 'uploaderContainer';// FileUploadManager 객체가 생성될 html div 태그 id
+managerProperties.uploadButtonDisplayStyle = "none"
+managerProperties.uploadUrl = uploadUrl;                   // 파일 업로드 처리 페이지 경로
+
+var monitorProperties = new Object();
+monitorProperties.monitorLayerClass = 'monitorLayer';      // FileUploadMonitor 창의 스타일입니다. (namocrossuploader.css 파일에 정의, 변경 가능)
+monitorProperties.monitorBgLayerClass = 'monitorBgLayer';  // FileUploadMonitor 창의 백그라운드 스타일입니다. (namocrossuploader.css 파일에 정의, 변경 가능)
+monitorProperties.closeMonitorCheckBoxChecked = true;      // 전송 완료 후 FileUploadMonitor 창 닫기 설정
+
+var uploader = namoCrossUploader.createUploader(
+	JSON.stringify(managerProperties),                          // FileUploadManager 프로퍼티를 JSON 문자열로 전달
+	JSON.stringify(monitorProperties),                          // FileUploadMonitor 프로퍼티를 JSON 문자열로 전달
+	JSON.stringify(window.namoCrossUploaderConfig.eventNames)); // 이벤트 이름을 JSON 문자열로 전달
+
+
+

 

+
+ + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/setUploaderProperties.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/setUploaderProperties.html new file mode 100644 index 00000000..1df284e2 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/setUploaderProperties.html @@ -0,0 +1,105 @@ + + + + +setUIProperties + + + + + + + + + + + + + +
+

BasicFileUploadManager

+
+

Methods

+
+

 

+
+

 

+
+ + + + + +
+

setUploaderProperties

+

BasicFileUploadManager 객체와 BasicFileUploadMonitor 객체의 UI 속성을 설정합니다.

+

 

+

Syntax

+
    +
    void setUploaderProperties ( Object uiProperties )
    +
+

Parameters

+

fileFilter

+

[in] BasicFileUploadManager 객체와 BasicFileUploadMonitor 객체의 UI 속성입니다.

+ +

 

+

Return Values

+

+

 

+

Remarks

+

+

 

+

Sample Codes

+

Javascript

+
+/**
+* UI Properties 변경 
+*/
+var resetUiProperties = function () {
+var mainWidth = document.getElementById('mainWidth').value;
+var mainHeight = document.getElementById('mainHeight').value;
+var mainBorderColor = document.getElementById('mainBorderColor').value;
+var topPanelDisplayStyle = (document.getElementsByName('topPanelDisplayStyle')[0].checked == true) ? 'block' : 'none';
+var selectFilesButtonDisplayStyle = (document.getElementsByName('selectFilesButtonDisplayStyle')[0].checked == true) ? 'block' : 'none';
+var selectFilesButtonDisabledStyle = (document.getElementsByName('selectFilesButtonDisabledStyle')[0].checked == true) ? true : false;
+var uploadButtonDisplayStyle = (document.getElementsByName('uploadButtonDisplayStyle')[0].checked == true) ? 'block' : 'none';
+var uploadButtonDisabledStyle = (document.getElementsByName('uploadButtonDisabledStyle')[0].checked == true) ? true : false;
+var closeMonitorCheckBoxChecked = (document.getElementsByName('closeMonitorCheckBoxChecked')[0].checked == true) ? true : false;
+
+var managerProperties = new Object();
+managerProperties.width = mainWidth;                                                // FileUploadManager 너비
+managerProperties.height = mainHeight;                                              // FileUploadManager 높이
+managerProperties.borderColor = mainBorderColor;                                    // FileUploadManager 보더 컬러
+managerProperties.topPanelDisplayStyle = topPanelDisplayStyle;                      // 상단 패널 Visible 상태 
+managerProperties.selectFilesButtonDisplayStyle = selectFilesButtonDisplayStyle;    // 파일선택 버튼 Visible 상태
+managerProperties.selectFilesButtonDisabledStyle = selectFilesButtonDisabledStyle;  // 파일선택 버튼 Enabled 상태
+managerProperties.uploadButtonDisplayStyle = uploadButtonDisplayStyle;              // 업로드 버튼 Visible 상태
+managerProperties.uploadButtonDisabledStyle = uploadButtonDisabledStyle;            // 업로드 버튼 Enabled 상태
+
+
+var monitorProperties = new Object();
+monitorProperties.closeMonitorCheckBoxChecked = closeMonitorCheckBoxChecked;        // 전송 완료 후 FileUploadMonitor 창 닫기 설정
+
+namoCrossUploader.setUploaderProperties(
+	JSON.stringify(managerProperties),                          // FileUploadManager 프로퍼티를 JSON 문자열로 전달
+	JSON.stringify(monitorProperties));                         // FileUploadMonitor 프로퍼티를 JSON 문자열로 전달
+
+
+// 상단 패널, 또는 버튼의 visible, enabled 상태에 따라 html 버튼의 visibility 설정
+document.getElementById("selectFiles").style.visibility = 'hidden';
+document.getElementById("startUpload").style.visibility = 'hidden';
+
+if (topPanelDisplayStyle == 'none') { 
+	document.getElementById("selectFiles").style.visibility = 'visible'; 
+	document.getElementById("startUpload").style.visibility = 'visible';
+}
+else if (selectFilesButtonDisplayStyle == 'none' || selectFilesButtonDisabledStyle == true)
+	document.getElementById("selectFiles").style.visibility = 'visible';
+else if (uploadButtonDisplayStyle == 'none' || uploadButtonDisabledStyle == true)
+	document.getElementById("startUpload").style.visibility = 'visible';
+}
+
+

 

+
+ + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/startUpload.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/startUpload.html new file mode 100644 index 00000000..41612081 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/BasicFileUploadManager/Methods/startUpload.html @@ -0,0 +1,74 @@ + + + + +startUpload + + + + + + + + + + + + + +
+

BasicFileUploadManager

+
+

Methods

+
+

 

+
+

 

+
+ + + + + +
+

startUpload

+

파일 업로드를 시작합니다.

+

 

+

Syntax

+
    +
    void startUpload ( )
    +
+

Parameters

+

+

+ +

 

+

Return Values

+

+

 

+

Remarks

+

+

 

+

Sample Codes

+

Javascript

+
+/**
+* 업로드 시작 시 호출됩니다.
+*/
+var onStartUploadCu = function () {
+	//alert('업로드가 시작됐습니다.');
+}
+
+
+/**
+ * 사용자 정의 업로드
+ */
+var onStartUpload = function () {
+	//alert('업로드가 시적되었습니다.');
+	uploader.startUpload();
+}
+
+

 

+
+ + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/MultipleFileDownloadManager/Events/onException.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/MultipleFileDownloadManager/Events/onException.html new file mode 100644 index 00000000..57a268ec --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/MultipleFileDownloadManager/Events/onException.html @@ -0,0 +1,93 @@ + + + + +onException + + + + + + + + + + + + + +
+

MultipleFileDownloadManager

+
+

Events

+
+

 

+
+

 

+
+ + + + + +
+

onException

+

예외 발생 시 호출됩니다.

+

 

+

Syntax

+
    +
    void onException ( String params )
    +
+

Parameters

+

params

+

[out] 예외정보로 JSON 타입의 String입니다.

+ +

 

+

Return Values

+

+

 

+

Remarks

+

+

 

+

Sample Codes

+

Javascript

+
+[namocrossuploader.js]
+/**
+* NamoCrossDownloader 객체에서 Javascript로 전송할 이벤트 함수 이름을 설정합니다.
+*/
+var getDownloadManagerEventNames = function () {
+    var flashvars = {};
+    flashvars.onCreationComplete     = "onCreationCompleteCd";       // NamoCrossDownloader Manager 객체 생성 완료 시
+    flashvars.onStartDownloadItem    = "onStartDownloadItemCd";      // 개별 파일의 다운로드 시작 시 (Single Download Only)
+    flashvars.onEndDownloadItem      = "onEndDownloadItemCd";        // 개별 파일의 다운로드 완료 시 (Single Download Only)
+    flashvars.onCancelDownloadItem   = "onCancelDownloadItemCd";     // 개별 파일의 다운로드 취소 시 (Single Download Only)
+    flashvars.onException            = "onExceptionCd";              // 예외 발생 시
+    return flashvars;
+}
+
+[DownloadForm.html]
+/**
+* 예외 발생 시 호출됩니다.
+*/ 
+var onExceptionCd = function (params) {
+    // 300~ : 일반적 예외
+    // 400~ : 시스템 예외
+    // 500~ : 서측에서 발생한 예외
+    // 필요한 예외정보만 고객에서 보여주십시오.
+	var obj = jQuery.parseJSON(params); 
+	alertTimeout("[예외 정보]\n" + "code : " + obj.code + "\n" + "message : " + obj.message + "\n" + "detailMessage : " + obj.detailMessage); 
+}
+
+/**
+* Flash로부터 호출되는 Javascript 콜백함수 내에서 alert 창을 띄우기 위한 처리로 Chrome, Firefox, Safari 브라우저의 일부 버전에 해당됩니다. 
+*/
+var alertTimeout = function (params) {
+    window.focus();
+    setTimeout(function () { alert(params) }, 100);
+}
+
+

 

+
+ + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/MultipleFileDownloadManager/Methods/addFile.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/MultipleFileDownloadManager/Methods/addFile.html new file mode 100644 index 00000000..cbf68577 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/MultipleFileDownloadManager/Methods/addFile.html @@ -0,0 +1,75 @@ + + + + +addFile + + + + + + + + + + + + + +
+

SingleFileDownloadManager

+
+

Methods

+
+

 

+
+

 

+
+ + + + + +
+

addFile

+

다운로드 할 파일을 추가합니다.

+

 

+

Syntax

+
    +
    void addFile ( Object fileInfo )
    +
+

Parameters

+

fileInfo

+

[in] 다운로드 할 파일정보입니다. 파일정보는 fileId, fileName, fileURL, fileSize 입니다.

+ +

 

+

Return Values

+

+

 

+

Remarks

+

+

 

+

Sample Codes

+

Javascript

+
+/**
+* 다운로드 할 파일 추가
+*/ 
+var fileIdArray = new Array('FILEID_0001', 'FILEID_0002', 'FILEID_0003'); 
+var fileNameArray = new Array('나모크로스에디터3_제품소개서.pdf', 'ActiveSquare 7_brochure.pdf', '130617_나모_펍트리_브로셔_130702.pdf');
+var fileSizeArray = new Array('2210715', '2816868', '2717166');
+
+for (var i = 0; i < fileIdArray.length; i++) {
+	var fileInfo = new Object();
+	fileInfo.fileId = fileIdArray[i];
+	fileInfo.fileName = fileNameArray[i];
+	fileInfo.fileSize = fileSizeArray[i];
+	fileInfo.fileUrl = downloadUrl; // 각 파일의 URL이 다르거나 SingleFileDownload일 때 사용됩니다.
+
+	downloader.addFile(JSON.stringify(fileInfo));
+}
+
+

 

+
+ + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/MultipleFileDownloadManager/Methods/setUIProperties.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/MultipleFileDownloadManager/Methods/setUIProperties.html new file mode 100644 index 00000000..63250dc3 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/MultipleFileDownloadManager/Methods/setUIProperties.html @@ -0,0 +1,91 @@ + + + + +setUIProperties + + + + + + + + + + + + + +
+

MultipleFileDownloadManager

+
+

Methods

+
+

 

+
+

 

+
+ + + + + +
+

setUIProperties

+

MultipleFileDownloadManager와 MultipleFileDownloadMonitor AIR 객체의 UI 속성을 설정합니다.

+

 

+

Syntax

+
    +
    void setUIProperties ( Object uiProperties )
    +
+

Parameters

+

fileFilter

+

[in] MultipleFileDownloadManager와 MultipleFileDownloadMonitor AIR 객체의 UI 속성입니다.

+ +

 

+

Return Values

+

+

 

+

Remarks

+

+

 

+

Sample Codes

+

Javascript

+
+/**
+* UI Properties 변경 
+*/
+var resetUiProperties = function () {
+	var mainWidth = document.getElementById('mainWidth').value;
+	var mainHeight = document.getElementById('mainHeight').value;
+	var mainBorderColor = document.getElementById('mainBorderColor').value;
+	var bottomPanelDisplayStyle = (document.getElementsByName('bottomPanelDisplayStyle')[0].checked == true) ? 'block' : 'none';
+	var downloadButtonDisplayStyle = (document.getElementsByName('downloadButtonDisplayStyle')[0].checked == true) ? 'block' : 'none';
+	var downloadButtonDisabledStyle = (document.getElementsByName('downloadButtonDisabledStyle')[0].checked == true) ? true : false;
+
+	var managerProperties = new Object();
+	managerProperties.uiMode = 'MULTIPLE';                                          // FileDownloadManager UI 모드 설정
+	managerProperties.width = mainWidth;                                            // FileDownloadManager 너비
+	managerProperties.height = mainHeight;                                          // FileDownloadManager 높이
+	managerProperties.borderColor = mainBorderColor;                                // FileDownloadManager 보더 컬러
+	managerProperties.bottomPanelDisplayStyle = bottomPanelDisplayStyle;            // 하단 패널 Visible 상태 
+	managerProperties.downloadButtonDisplayStyle = downloadButtonDisplayStyle;      // 다운로드 버튼 Visible 상태
+	managerProperties.downloadButtonDisabledStyle = downloadButtonDisabledStyle;    // 다운로드 버튼 Enabled 상태
+
+	namoCrossUploader.setDownloaderProperties(
+		JSON.stringify(managerProperties));                                         // FileDownloadManager 프로퍼티를 JSON 문자열로 전달
+
+
+	// 하단 패널, 또는 버튼의 visible, enabled 상태에 따라 html 버튼의 visibility 설정
+	document.getElementById("startDownload").style.visibility = "hidden";
+
+	if (bottomPanelDisplayStyle == 'none')
+		document.getElementById("startDownload").style.visibility = "visible";
+	else if (downloadButtonDisplayStyle == 'none' || downloadButtonDisabledStyle == true)
+		document.getElementById("startDownload").style.visibility = "visible";
+}
+
+

 

+
+ + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/SingleFileDownloadManager/Methods/addFile.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/SingleFileDownloadManager/Methods/addFile.html new file mode 100644 index 00000000..cbf68577 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/SingleFileDownloadManager/Methods/addFile.html @@ -0,0 +1,75 @@ + + + + +addFile + + + + + + + + + + + + + +
+

SingleFileDownloadManager

+
+

Methods

+
+

 

+
+

 

+
+ + + + + +
+

addFile

+

다운로드 할 파일을 추가합니다.

+

 

+

Syntax

+
    +
    void addFile ( Object fileInfo )
    +
+

Parameters

+

fileInfo

+

[in] 다운로드 할 파일정보입니다. 파일정보는 fileId, fileName, fileURL, fileSize 입니다.

+ +

 

+

Return Values

+

+

 

+

Remarks

+

+

 

+

Sample Codes

+

Javascript

+
+/**
+* 다운로드 할 파일 추가
+*/ 
+var fileIdArray = new Array('FILEID_0001', 'FILEID_0002', 'FILEID_0003'); 
+var fileNameArray = new Array('나모크로스에디터3_제품소개서.pdf', 'ActiveSquare 7_brochure.pdf', '130617_나모_펍트리_브로셔_130702.pdf');
+var fileSizeArray = new Array('2210715', '2816868', '2717166');
+
+for (var i = 0; i < fileIdArray.length; i++) {
+	var fileInfo = new Object();
+	fileInfo.fileId = fileIdArray[i];
+	fileInfo.fileName = fileNameArray[i];
+	fileInfo.fileSize = fileSizeArray[i];
+	fileInfo.fileUrl = downloadUrl; // 각 파일의 URL이 다르거나 SingleFileDownload일 때 사용됩니다.
+
+	downloader.addFile(JSON.stringify(fileInfo));
+}
+
+

 

+
+ + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/SingleFileDownloadManager/Methods/setDownloaderProperties.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/SingleFileDownloadManager/Methods/setDownloaderProperties.html new file mode 100644 index 00000000..a31aab53 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/api/SingleFileDownloadManager/Methods/setDownloaderProperties.html @@ -0,0 +1,76 @@ + + + + +setUIProperties + + + + + + + + + + + + + +
+

SingleFileDownloadManager

+
+

Methods

+
+

 

+
+

 

+
+ + + + + +
+

setUIProperties

+

SingleFileDownloadManager 객체의 UI 속성을 설정합니다.

+

 

+

Syntax

+
    +
    void setUIProperties ( Object uiProperties )
    +
+

Parameters

+

fileFilter

+

[in] SingleFileDownloadManager 객체의 UI 속성입니다.

+ +

 

+

Return Values

+

+

 

+

Remarks

+

+

 

+

Sample Codes

+

Javascript

+
+/**
+ * UI Properties 변경 
+ */
+var resetUiProperties = function () {
+	var mainWidth = document.getElementById('mainWidth').value;
+	var mainHeight = document.getElementById('mainHeight').value;
+	var mainBorderColor = document.getElementById('mainBorderColor').value;
+
+	var managerProperties = new Object();
+	managerProperties.uiMode = 'SINGLE';                                            // FileDownloadManager UI 모드 설정
+	managerProperties.width = mainWidth;                                            // FileDownloadManager 너비
+	managerProperties.height = mainHeight;                                          // FileDownloadManager 높이
+	managerProperties.borderColor = mainBorderColor;                                // FileDownloadManager 보더 컬러
+
+	namoCrossUploader.setDownloaderProperties(
+		JSON.stringify(managerProperties));                                         // FileDownloadManager 프로퍼티를 JSON 문자열로 전달
+}
+
+

 

+
+ + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/body_api.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/body_api.html new file mode 100644 index 00000000..a0264f4e --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/body_api.html @@ -0,0 +1,85 @@ + + + + + +Namo CrossUploader Client Flex Edition Manual + + + + + + + + + + + + + + +
+ + +
+ + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/body_intro.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/body_intro.html new file mode 100644 index 00000000..d9b86341 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/body_intro.html @@ -0,0 +1,29 @@ + + + + + +Namo CrossUploader Client Html5 Edition Manual + + + + + + + + + + +
+ +
+ +

소개

+ +
+ +
+ +
+ + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/images/linkstyle.css b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/images/linkstyle.css new file mode 100644 index 00000000..5dc2bf2c --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/images/linkstyle.css @@ -0,0 +1,102 @@ +P { + FONT-SIZE: 9pt; FONT-FAMILY: ,serif +} +LI { + FONT-SIZE: 9pt; FONT-FAMILY: ,serif +} +PRE { + PADDING-RIGHT: 5pt; MARGIN-TOP: 0px; PADDING-LEFT: 5pt; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 5pt; MARGIN-LEFT: 0px; PADDING-TOP: 5pt; FONT-FAMILY: 'courier new',courier,serif,; BACKGROUND-COLOR: rgb(238,238,238) +} +DD { + MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 25px; LINE-HEIGHT: 150%; FONT-FAMILY: ,serif +} +.dscrpt { + MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 25px; LINE-HEIGHT: 150%; FONT-FAMILY: ,sans-serif; +} +.para { + MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 25px; COLOR: blue; LINE-HEIGHT: 150%; FONT-STYLE: italic; FONT-FAMILY: 'courier new',sans-serif +} +.paradsc { + MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-BOTTOM: 5px; MARGIN-LEFT: 75px; LINE-HEIGHT: 150%; FONT-FAMILY: ,sans-serif +} +.paradsc2 { + MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 75px; LINE-HEIGHT: 120%; FONT-FAMILY: ,sans-serif; +} +.paraname { + COLOR: blue; FONT-STYLE: italic; FONT-FAMILY: 'courier new',sans-serif +} +.fname { + FONT-WEIGHT: bold; COLOR: blue +} +.scode { + MARGIN-TOP: 0px; FONT-SIZE: 9pt; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 35px; COLOR: blue; LINE-HEIGHT: 150%; FONT-FAMILY: ,serif +} +.scodedsc { + MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 35px; LINE-HEIGHT: 150% +} +.scodecmt { + FONT-SIZE: 9pt; COLOR: rgb(51,153,0); FONT-FAMILY: +} +H1 { + FONT-SIZE: 16pt; MARGIN-BOTTOM: 30px; COLOR: rgb(72,82,133); FONT-FAMILY: , Verdana +} +H2 { + MARGIN-TOP: 5px; FONT-SIZE: 12pt; MARGIN-BOTTOM: 10px; FONT-FAMILY: Verdana +} +H3 { + MARGIN-TOP: 40pt; FONT-SIZE: 12pt; MARGIN-LEFT: 30pt; COLOR: rgb(70,115,160); FONT-FAMILY: +} +H4 { + MARGIN-TOP: 5px; FONT-SIZE: 11pt; MARGIN-BOTTOM: 10px; COLOR: rgb(51,51,153); FONT-FAMILY: Verdana,serif +} +H5 { + FONT-SIZE: 10pt; MARGIN-LEFT: 30pt; COLOR: #000066; FONT-FAMILY: +} +H2 SUB { + FONT-SIZE: 10pt; MARGIN-LEFT: 25px; COLOR: #999999; FONT-FAMILY: Verdana +} +.mtext { + MARGIN-TOP: 0pt; FONT-SIZE: 9pt; MARGIN-BOTTOM: 5pt; MARGIN-LEFT: 30pt; LINE-HEIGHT: 150%; FONT-FAMILY: +} +.ini_title { + FONT-WEIGHT: bold; FONT-SIZE: 12pt; MARGIN-LEFT: 30pt +} +.ini_syntax { + FONT-WEIGHT: bold; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0pt; MARGIN-LEFT: 30pt; COLOR: rgb(72,82,133) +} +.ini_text { + MARGIN-TOP: 0pt; FONT-SIZE: 10pt; MARGIN-BOTTOM: 0pt; MARGIN-LEFT: 50pt; LINE-HEIGHT: 150% +} +.ini_example { + FONT-SIZE: 10pt; COLOR: #000066 +} +.ini_italic { + FONT-WEIGHT: normal; FONT-SIZE: 10pt; FONT-STYLE: italic +} +.ctbic { + FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: ,serif +} +.ctmid { + MARGIN-TOP: 15pt; FONT-WEIGHT: bold; FONT-SIZE: 9pt; MARGIN-BOTTOM: 3pt; COLOR: rgb(72,82,133); FONT-FAMILY: ,serif +} +.ctsmall { + MARGIN-TOP: 0pt; FONT-SIZE: 9pt; MARGIN-BOTTOM: 3pt; MARGIN-LEFT: 11pt; FONT-FAMILY: +} +.pme { + FONT-SIZE: 8pt; COLOR: #999999; FONT-FAMILY: Verdana +} +.menu { + FONT-SIZE: 9pt; COLOR: rgb(0,102,153); FONT-FAMILY: +} +.order { + FONT-SIZE: 10pt; COLOR: rgb(153,153,153); FONT-FAMILY: 'Arial Black' +} + +body{ + scrollbar-3dlight-color:9B9B9B; + scrollbar-arrow-color:ffffff; + scrollbar-base-color:E2E2E2; + scrollbar-darkshadow-color:FFFFFF; + scrollbar-face-color:E2E2E2; + scrollbar-highlight-color:FFFFF; + scrollbar-shadow-color:9B9B9B} \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/intro.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/intro.html new file mode 100644 index 00000000..4872c70a --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev/intro.html @@ -0,0 +1,27 @@ + + + + + +Namo CrossUploader Client Html5 Edition Manual + + + + + + + + +
+

소개

+

Namo CrossUploader Client Html5 Edition은

+

HTTP 프로토콜 기반의 Client-Side 업로드 컴포넌트로입니다.

+

이 제품은 Html5기반의 제품으로서 Html5가 지원되는 브라우저 환경을 지원합니다.

+ +

이 안내서는

+

개발자 안내서에서는 Namo CrossUploader Client Html5 Edition의 기능과 + 프로그램 제어를 위한 API(Application Programming Interface)에 대하여 안내합니다.

+
+ + + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev_header.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev_header.html new file mode 100644 index 00000000..c84bbebd --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev_header.html @@ -0,0 +1,50 @@ + + + + + +Namo CrossUploader Client Flex Edition Manual + + + + + + + + +
+ + + + + + +
+
+ +
+
+
+ + + + + +
+ + + + + + + +
   소개      API(Html5) 안내   
+
+
+ + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev_index.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev_index.html new file mode 100644 index 00000000..1a74e286 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/dev_index.html @@ -0,0 +1,13 @@ + + + + + +Namo CrossUploader Client Flex Edition Manual + + + + + + + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/header_bg.gif b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/header_bg.gif new file mode 100644 index 00000000..61a3a521 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/header_bg.gif differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/header_bg.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/header_bg.png new file mode 100644 index 00000000..dd340160 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/header_bg.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/icon_list_01.gif b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/icon_list_01.gif new file mode 100644 index 00000000..8313bb18 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/icon_list_01.gif differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/icon_list_01.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/icon_list_01.png new file mode 100644 index 00000000..63f780be Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/icon_list_01.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/icon_list_02.gif b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/icon_list_02.gif new file mode 100644 index 00000000..ac554a44 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/icon_list_02.gif differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/icon_list_02.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/icon_list_02.png new file mode 100644 index 00000000..99a86208 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/icon_list_02.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/icon_list_03.gif b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/icon_list_03.gif new file mode 100644 index 00000000..ad5926fc Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/icon_list_03.gif differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/icon_list_03.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/icon_list_03.png new file mode 100644 index 00000000..dfa0e3dd Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/icon_list_03.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/menu_line.gif b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/menu_line.gif new file mode 100644 index 00000000..e1f92afa Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/menu_line.gif differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/menu_line.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/menu_line.png new file mode 100644 index 00000000..c26c5138 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/menu_line.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/navibg_left.gif b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/navibg_left.gif new file mode 100644 index 00000000..e0219e4e Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/navibg_left.gif differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/navibg_left.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/navibg_left.png new file mode 100644 index 00000000..62b2d399 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/navibg_left.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/navibg_left_on.gif b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/navibg_left_on.gif new file mode 100644 index 00000000..4884e9fb Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/navibg_left_on.gif differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/navibg_left_on.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/navibg_left_on.png new file mode 100644 index 00000000..3dd6fdde Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/navibg_left_on.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/navibg_right.gif b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/navibg_right.gif new file mode 100644 index 00000000..e0219e4e Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/navibg_right.gif differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/navibg_right.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/navibg_right.png new file mode 100644 index 00000000..62b2d399 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/navibg_right.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/navibg_right_on.gif b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/navibg_right_on.gif new file mode 100644 index 00000000..4884e9fb Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/navibg_right_on.gif differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/navibg_right_on.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/navibg_right_on.png new file mode 100644 index 00000000..3dd6fdde Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/navibg_right_on.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/table_navi_bg.gif b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/table_navi_bg.gif new file mode 100644 index 00000000..9d9c8267 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/table_navi_bg.gif differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/table_navi_bg.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/table_navi_bg.png new file mode 100644 index 00000000..48e90609 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/table_navi_bg.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/table_sub_bg.gif b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/table_sub_bg.gif new file mode 100644 index 00000000..6d950191 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/table_sub_bg.gif differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/table_sub_bg.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/table_sub_bg.png new file mode 100644 index 00000000..2e776290 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/table_sub_bg.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/title_bi.gif b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/title_bi.gif new file mode 100644 index 00000000..7c244031 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/title_bi.gif differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/title_bi.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/title_bi.png new file mode 100644 index 00000000..7013437b Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/title_bi.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/title_ci.gif b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/title_ci.gif new file mode 100644 index 00000000..f35f9655 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/title_ci.gif differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/title_ci.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/title_ci.png new file mode 100644 index 00000000..793cc106 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/images/title_ci.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/index.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/index.html new file mode 100644 index 00000000..4efa9cf6 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/index.html @@ -0,0 +1,17 @@ + + + + + +Namo CrossUploader Client Flex Edition Manual + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/popup.js b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/popup.js new file mode 100644 index 00000000..c5f7dd31 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Manual/popup.js @@ -0,0 +1,14 @@ +/* expand and collapse +*/ +function doExpand(paraNum){ + if (paraNum.style.display=="none") { + paraNum.style.display="block"; + } + else{ + paraNum.style.display="none"; + } +} + +popfont="Facename[, point size[, charset[, PLAIN BOLD ITALIC UNDERLINE]]]" +Text1="The text for the first pop-up window." +Text2="The text for the second pop-up window." \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/DownloadFiles/130617_나모_펍트리_브로셔_130702.pdf b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/DownloadFiles/130617_나모_펍트리_브로셔_130702.pdf new file mode 100644 index 00000000..ece5a9c0 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/DownloadFiles/130617_나모_펍트리_브로셔_130702.pdf differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/DownloadFiles/3_제품소개서.pdf b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/DownloadFiles/3_제품소개서.pdf new file mode 100644 index 00000000..e8e5c246 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/DownloadFiles/3_제품소개서.pdf differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/DownloadFiles/ActiveSquare 7_brochure.pdf b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/DownloadFiles/ActiveSquare 7_brochure.pdf new file mode 100644 index 00000000..50101e1d Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/DownloadFiles/ActiveSquare 7_brochure.pdf differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/DownloadFiles/ActiveSquare 7_brochure_02.pdf b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/DownloadFiles/ActiveSquare 7_brochure_02.pdf new file mode 100644 index 00000000..50101e1d Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/DownloadFiles/ActiveSquare 7_brochure_02.pdf differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/DownloadFiles/ActiveSquare 7_brochure_03.pdf b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/DownloadFiles/ActiveSquare 7_brochure_03.pdf new file mode 100644 index 00000000..50101e1d Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/DownloadFiles/ActiveSquare 7_brochure_03.pdf differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/ExposedFileDownload/DownloadForm.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/ExposedFileDownload/DownloadForm.html new file mode 100644 index 00000000..a44bf88d --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/ExposedFileDownload/DownloadForm.html @@ -0,0 +1,96 @@ + + + + + Server-Side 연동 없이 웹상에 노출된 파일을 다운로드하는 예제입니다. + + + + + + + + + + + + + + + + + + + + + + + + +
+
샘플 설명
+
Server-Side 연동 없이 웹상에 노출된 파일을 다운로드하는 예제입니다. 파일 노출여부가 중요하지 않을 때 사용해 주십시오. (싱글 파일 다운로드에서만 사용)
+
샘플 경로
+
Samples/Download/ExposedFileDownload
+

+ +
+ + +
+ + +
+ + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/MoveFileLocation/DownloadForm.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/MoveFileLocation/DownloadForm.html new file mode 100644 index 00000000..9e02e947 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/MoveFileLocation/DownloadForm.html @@ -0,0 +1,132 @@ + + + + + 파일 리스트 정렬 및 위치 이동 예제입니다. + + + + + + + + + + + + + + + + + + + + + + + + + +
+
샘플 설명
+
파일 리스트 정렬 및 위치 이동 예제입니다. (싱글 파일 다운로드 동일)
+
샘플 경로
+
Samples/Download/MoveFileLocation
+

+ +
+ + + +
+
+ + +
+
+
+ + + + +
+
+ + + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/MoveFileLocation/DownloadProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/MoveFileLocation/DownloadProcess.jsp new file mode 100644 index 00000000..f02d851e --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/MoveFileLocation/DownloadProcess.jsp @@ -0,0 +1,205 @@ +<%@page language="java" contentType="text/html; charset=UTF-8"%> +<%@page import="com.namo.crossuploader.*"%> +<%@page import="java.io.*"%> +<%@page import="java.net.URLEncoder"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> +<%@page import="java.util.List"%> +<%@page import="java.util.ArrayList"%> +<%@page import="java.io.BufferedInputStream"%> +<%@page import="java.io.BufferedOutputStream"%> +<%@page import="java.io.File"%> +<%@page import="java.io.FileInputStream"%> +<%@page import="java.io.FileOutputStream"%> +<%@page import="java.util.zip.ZipEntry"%> +<%@page import="java.util.zip.ZipInputStream"%> +<%@page import="java.util.zip.ZipOutputStream"%> +<%@page import="java.io.FileNotFoundException"%> +<%@page import="java.io.IOException"%> + +<% + out.clear(); + FileDownload fileDownload = new FileDownload(request, response); + + String tempZipFilePath = ""; + + try { + String downloadFormData = request.getParameter("CD_DOWNLOAD_FILE_INFO"); + if (downloadFormData == null) + throw new Exception("다운로드 중 예외가 발생했습니다."); + + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(downloadFormData); + System.out.println("obj : " + obj); + + JSONArray downloadFileInfoArray = (JSONArray)obj; + + + // JSONObject jsonObject = (JSONObject)downloadFileInfoArray.get(i); + // (String)jsonObject.get("fileId"); + // (String)jsonObject.get("fileName"); // 필요할 경우 사용합니다. + // (String)jsonObject.get("fileSize"); // 필요할 경우 사용합니다. + // (String)jsonObject.get("fileUrl"); // 각 파일의 URL이 다르거나 SingleFileDownload일 때 사용됩니다 + + String fileNameAlias = ""; + String filePath = request.getSession().getServletContext().getRealPath("NamoCrossUploaderH5Samples/DownloadFiles"); + if(downloadFileInfoArray.size() == 1) + { + JSONObject jsonObject = (JSONObject)downloadFileInfoArray.get(0); + fileNameAlias = GetFileNameAlias((String)jsonObject.get("fileId")); + filePath += (File.separator + fileNameAlias); + } + else if(downloadFileInfoArray.size() > 1) + { + List filePathList = GetFilePathList(downloadFileInfoArray, filePath); + + tempZipFilePath = CompressFiles(filePathList); + + filePath = tempZipFilePath; + fileNameAlias = "download.zip"; + } + + // fileNameAlias는 웹서버 환경에 따라 적절히 인코딩 되어야 합니다. + fileNameAlias = URLEncoder.encode(fileNameAlias, "UTF-8"); + + // attachment 옵션에 따라 파일 종류에 관계 없이 항상 파일 저장 대화상자를 출력할 수 있습니다. + boolean attachment = true; + // resumable 옵션에 따라 파일 이어받기가 가능합니다. + // 클라이언트에서 이어받기 요청이 있어야 하며, 이어받기 요청이 없을 경우 일반 다운로드와 동일하게 동작합니다. + boolean resumable = true; + // filePath에 지정된 파일을 fileNameAlias 이름으로 다운로드 합니다. + fileDownload.startDownload(filePath, fileNameAlias, attachment, resumable); + + + // 다른 유형의 다운로드 함수들 + // startDownload(String filePath); + // startDownload(String filePath, boolean attachment); + // startDownload(String filePath, boolean attachment, boolean resumable); + // startDownload(String filePath, String fileNameAlias); + + //startDownload(filePath, fileNameAlias, attachment); + // startStreamDownload(InputStream inputStream, String fileNameAlias, long fileSize, boolean attachment); + } + catch(CrossUploaderException ex) { + out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + System.out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + } + catch(FileNotFoundException ex) { + out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + System.out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + } + catch(IOException ex) { + out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + System.out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + } + catch(Exception ex) { + out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + System.out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + } +%><%! + private List GetFilePathList(JSONArray downloadFileInfoArray, String filePath) throws Exception + { + List filePathList = new ArrayList(); + + /** + * 다운로드 할 파일 설정 + * DB 등에 저장된 파일의 정보를 가져옵니다. 샘플에서는 filePath 경로에 아래 파일들이 존재하는 것을 가정합니다. + */ + for (int i = 0; i < downloadFileInfoArray.size(); i++) + { + JSONObject downloadFileInfo = (JSONObject)downloadFileInfoArray.get(i); + System.out.println("GetFilePathList_downloadFileInfo :" + downloadFileInfo); + String fileId = (String)downloadFileInfo.get("fileId"); + System.out.println("GetFilePathList_fileId :" + fileId); + + String fileName = ""; + if (fileId.compareTo("FILEID_0001") == 0) + fileName = "나모크로스에디터3_제품소개서.pdf"; + else if (fileId.compareTo("FILEID_0002") == 0) + fileName = "ActiveSquare 7_brochure.pdf"; + else if (fileId.compareTo("FILEID_0003") == 0) + fileName = "130617_나모_펍트리_브로셔_130702.pdf"; + else + throw new Exception("다운로드 할 파일이 없습니다."); + + filePathList.add(filePath + (File.separator + fileName)); + + System.out.println("GetFilePathList_filePathList :" + filePathList); + } + + return filePathList; + } + + private String GetFileNameAlias(String fileId) throws Exception + { + /** + * 다운로드 할 파일 설정 + * DB 등에 저장된 파일의 정보를 가져옵니다. 샘플에서는 아래 파일들이 존재하는 것을 가정합니다. + */ + String fileNameAlias = ""; + if (fileId.compareTo("FILEID_0001") == 0) + fileNameAlias = "나모크로스에디터3_제품소개서.pdf.pdf"; + else if (fileId.compareTo("FILEID_0002") == 0) + fileNameAlias = "ActiveSquare 7_brochure.pdf"; + else if (fileId.compareTo("FILEID_0003") == 0) + fileNameAlias = "130617_나모_펍트리_브로셔_130702.pdf"; + else + throw new Exception("다운로드 할 파일이 업습니다."); + + return fileNameAlias; + + } + + public String CompressFiles(List filePathList) throws IOException + { + final int BUFFER_SIZE = 1024 * 2; + final int COMPRESSION_LEVEL = 9; + String tempZipFilePath = ""; + + File tempZipFile= File.createTempFile("namo_download_", ".tmp"); + FileOutputStream fos = new FileOutputStream(tempZipFile); // FileOutputStream; + BufferedOutputStream bos = new BufferedOutputStream(fos); // BufferedStream + ZipOutputStream zos = new ZipOutputStream(bos); // ZipOutputStream + zos.setLevel(COMPRESSION_LEVEL); // 압축 레벨 - 최대 압축률은 9, 디폴트 8 + + for(int i=0; i \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/MultipleFileDownload/DownloadForm.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/MultipleFileDownload/DownloadForm.html new file mode 100644 index 00000000..9e13edbc --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/MultipleFileDownload/DownloadForm.html @@ -0,0 +1,95 @@ + + + + + 멀티플 파일 다운로드 예제입니다. + + + + + + + + + + + + + + + + + + + + + + + +
+
샘플 설명
+
멀티플 파일 다운로드 예제입니다. 2개 이상의 파일을 다운로드 할 경우 하나의 파일로 압축하여 다운로드 합니다.
+
샘플 경로
+
Samples/Download/MultipleFileDownload
+

+ +
+ + +
+ + +
+ + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/MultipleFileDownload/DownloadProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/MultipleFileDownload/DownloadProcess.jsp new file mode 100644 index 00000000..f02d851e --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/MultipleFileDownload/DownloadProcess.jsp @@ -0,0 +1,205 @@ +<%@page language="java" contentType="text/html; charset=UTF-8"%> +<%@page import="com.namo.crossuploader.*"%> +<%@page import="java.io.*"%> +<%@page import="java.net.URLEncoder"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> +<%@page import="java.util.List"%> +<%@page import="java.util.ArrayList"%> +<%@page import="java.io.BufferedInputStream"%> +<%@page import="java.io.BufferedOutputStream"%> +<%@page import="java.io.File"%> +<%@page import="java.io.FileInputStream"%> +<%@page import="java.io.FileOutputStream"%> +<%@page import="java.util.zip.ZipEntry"%> +<%@page import="java.util.zip.ZipInputStream"%> +<%@page import="java.util.zip.ZipOutputStream"%> +<%@page import="java.io.FileNotFoundException"%> +<%@page import="java.io.IOException"%> + +<% + out.clear(); + FileDownload fileDownload = new FileDownload(request, response); + + String tempZipFilePath = ""; + + try { + String downloadFormData = request.getParameter("CD_DOWNLOAD_FILE_INFO"); + if (downloadFormData == null) + throw new Exception("다운로드 중 예외가 발생했습니다."); + + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(downloadFormData); + System.out.println("obj : " + obj); + + JSONArray downloadFileInfoArray = (JSONArray)obj; + + + // JSONObject jsonObject = (JSONObject)downloadFileInfoArray.get(i); + // (String)jsonObject.get("fileId"); + // (String)jsonObject.get("fileName"); // 필요할 경우 사용합니다. + // (String)jsonObject.get("fileSize"); // 필요할 경우 사용합니다. + // (String)jsonObject.get("fileUrl"); // 각 파일의 URL이 다르거나 SingleFileDownload일 때 사용됩니다 + + String fileNameAlias = ""; + String filePath = request.getSession().getServletContext().getRealPath("NamoCrossUploaderH5Samples/DownloadFiles"); + if(downloadFileInfoArray.size() == 1) + { + JSONObject jsonObject = (JSONObject)downloadFileInfoArray.get(0); + fileNameAlias = GetFileNameAlias((String)jsonObject.get("fileId")); + filePath += (File.separator + fileNameAlias); + } + else if(downloadFileInfoArray.size() > 1) + { + List filePathList = GetFilePathList(downloadFileInfoArray, filePath); + + tempZipFilePath = CompressFiles(filePathList); + + filePath = tempZipFilePath; + fileNameAlias = "download.zip"; + } + + // fileNameAlias는 웹서버 환경에 따라 적절히 인코딩 되어야 합니다. + fileNameAlias = URLEncoder.encode(fileNameAlias, "UTF-8"); + + // attachment 옵션에 따라 파일 종류에 관계 없이 항상 파일 저장 대화상자를 출력할 수 있습니다. + boolean attachment = true; + // resumable 옵션에 따라 파일 이어받기가 가능합니다. + // 클라이언트에서 이어받기 요청이 있어야 하며, 이어받기 요청이 없을 경우 일반 다운로드와 동일하게 동작합니다. + boolean resumable = true; + // filePath에 지정된 파일을 fileNameAlias 이름으로 다운로드 합니다. + fileDownload.startDownload(filePath, fileNameAlias, attachment, resumable); + + + // 다른 유형의 다운로드 함수들 + // startDownload(String filePath); + // startDownload(String filePath, boolean attachment); + // startDownload(String filePath, boolean attachment, boolean resumable); + // startDownload(String filePath, String fileNameAlias); + + //startDownload(filePath, fileNameAlias, attachment); + // startStreamDownload(InputStream inputStream, String fileNameAlias, long fileSize, boolean attachment); + } + catch(CrossUploaderException ex) { + out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + System.out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + } + catch(FileNotFoundException ex) { + out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + System.out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + } + catch(IOException ex) { + out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + System.out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + } + catch(Exception ex) { + out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + System.out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + } +%><%! + private List GetFilePathList(JSONArray downloadFileInfoArray, String filePath) throws Exception + { + List filePathList = new ArrayList(); + + /** + * 다운로드 할 파일 설정 + * DB 등에 저장된 파일의 정보를 가져옵니다. 샘플에서는 filePath 경로에 아래 파일들이 존재하는 것을 가정합니다. + */ + for (int i = 0; i < downloadFileInfoArray.size(); i++) + { + JSONObject downloadFileInfo = (JSONObject)downloadFileInfoArray.get(i); + System.out.println("GetFilePathList_downloadFileInfo :" + downloadFileInfo); + String fileId = (String)downloadFileInfo.get("fileId"); + System.out.println("GetFilePathList_fileId :" + fileId); + + String fileName = ""; + if (fileId.compareTo("FILEID_0001") == 0) + fileName = "나모크로스에디터3_제품소개서.pdf"; + else if (fileId.compareTo("FILEID_0002") == 0) + fileName = "ActiveSquare 7_brochure.pdf"; + else if (fileId.compareTo("FILEID_0003") == 0) + fileName = "130617_나모_펍트리_브로셔_130702.pdf"; + else + throw new Exception("다운로드 할 파일이 없습니다."); + + filePathList.add(filePath + (File.separator + fileName)); + + System.out.println("GetFilePathList_filePathList :" + filePathList); + } + + return filePathList; + } + + private String GetFileNameAlias(String fileId) throws Exception + { + /** + * 다운로드 할 파일 설정 + * DB 등에 저장된 파일의 정보를 가져옵니다. 샘플에서는 아래 파일들이 존재하는 것을 가정합니다. + */ + String fileNameAlias = ""; + if (fileId.compareTo("FILEID_0001") == 0) + fileNameAlias = "나모크로스에디터3_제품소개서.pdf.pdf"; + else if (fileId.compareTo("FILEID_0002") == 0) + fileNameAlias = "ActiveSquare 7_brochure.pdf"; + else if (fileId.compareTo("FILEID_0003") == 0) + fileNameAlias = "130617_나모_펍트리_브로셔_130702.pdf"; + else + throw new Exception("다운로드 할 파일이 업습니다."); + + return fileNameAlias; + + } + + public String CompressFiles(List filePathList) throws IOException + { + final int BUFFER_SIZE = 1024 * 2; + final int COMPRESSION_LEVEL = 9; + String tempZipFilePath = ""; + + File tempZipFile= File.createTempFile("namo_download_", ".tmp"); + FileOutputStream fos = new FileOutputStream(tempZipFile); // FileOutputStream; + BufferedOutputStream bos = new BufferedOutputStream(fos); // BufferedStream + ZipOutputStream zos = new ZipOutputStream(bos); // ZipOutputStream + zos.setLevel(COMPRESSION_LEVEL); // 압축 레벨 - 최대 압축률은 9, 디폴트 8 + + for(int i=0; i \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/SingleFileDownload/DownloadForm.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/SingleFileDownload/DownloadForm.html new file mode 100644 index 00000000..303c980c --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/SingleFileDownload/DownloadForm.html @@ -0,0 +1,102 @@ + + + + + 싱글 파일 다운로드 예제입니다. + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
샘플 설명
+
싱글 파일 다운로드 예제입니다.
+
샘플 경로
+
Samples/Download/SingleFileDownload
+

+ +
+ + + +
+ + +
+ + + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/SingleFileDownload/DownloadProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/SingleFileDownload/DownloadProcess.jsp new file mode 100644 index 00000000..87f28cf2 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Download/SingleFileDownload/DownloadProcess.jsp @@ -0,0 +1,183 @@ +<%@page language="java" contentType="text/html; charset=UTF-8"%> +<%@page import="com.namo.crossuploader.*"%> +<%@page import="java.io.*"%> +<%@page import="java.net.URLEncoder"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> +<%@page import="java.util.List"%> +<%@page import="java.util.ArrayList"%> +<%@page import="java.io.BufferedInputStream"%> +<%@page import="java.io.BufferedOutputStream"%> +<%@page import="java.io.File"%> +<%@page import="java.io.FileInputStream"%> +<%@page import="java.io.FileOutputStream"%> +<%@page import="java.util.zip.ZipEntry"%> +<%@page import="java.util.zip.ZipInputStream"%> +<%@page import="java.util.zip.ZipOutputStream"%> +<%@page import="java.io.FileNotFoundException"%> +<%@page import="java.io.IOException"%> + +<% + out.clear(); + FileDownload fileDownload = new FileDownload(request, response); + + String tempZipFilePath = ""; + + try { + String downloadFormData = request.getParameter("CD_DOWNLOAD_FILE_INFO"); + if (downloadFormData == null) + throw new Exception("다운로드 중 예외가 발생했습니다."); + + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(downloadFormData); + + + //JSONObject jsonObject = (JSONObject)downloadFileInfoArray.get(i); + //(String)jsonObject.get("fileId"); + //(String)jsonObject.get("fileName"); // 필요할 경우 사용합니다. + //(String)jsonObject.get("fileSize"); // 필요할 경우 사용합니다. + //(String)jsonObject.get("fileUrl"); // 각 파일의 URL이 다르거나 SingleFileDownload일 때 사용됩니다 + + String fileNameAlias = ""; + String filePath = request.getSession().getServletContext().getRealPath("NamoCrossUploaderH5Samples/DownloadFiles"); + + JSONObject jsonObject = (JSONObject)obj; + fileNameAlias = GetFileNameAlias((String)jsonObject.get("fileId")); + filePath += (File.separator + fileNameAlias); + // fileNameAlias는 웹서버 환경에 따라 적절히 인코딩 되어야 합니다. + fileNameAlias = URLEncoder.encode(fileNameAlias, "UTF-8"); + + // attachment 옵션에 따라 파일 종류에 관계 없이 항상 파일 저장 대화상자를 출력할 수 있습니다. + boolean attachment = true; + // resumable 옵션에 따라 파일 이어받기가 가능합니다. + // 클라이언트에서 이어받기 요청이 있어야 하며, 이어받기 요청이 없을 경우 일반 다운로드와 동일하게 동작합니다. + boolean resumable = true; + // filePath에 지정된 파일을 fileNameAlias 이름으로 다운로드 합니다. + fileDownload.startDownload(filePath, fileNameAlias, attachment, resumable); + + + // 다른 유형의 다운로드 함수들 + // startDownload(String filePath); + // startDownload(String filePath, boolean attachment); + // startDownload(String filePath, boolean attachment, boolean resumable); + // startDownload(String filePath, String fileNameAlias); + // startDownload(String filePath, String fileNameAlias, boolean attachment); + // startStreamDownload(InputStream inputStream, String fileNameAlias, long fileSize, boolean attachment); + } + catch(CrossUploaderException ex) { + out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + System.out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + } + catch(FileNotFoundException ex) { + out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + System.out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + } + catch(IOException ex) { + out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + System.out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + } + catch(Exception ex) { + out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + System.out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + } +%><%! + private List GetFilePathList(JSONArray downloadFileInfoArray, String filePath) throws Exception + { + List filePathList = new ArrayList(); + + /** + * 다운로드 할 파일 설정 + * DB 등에 저장된 파일의 정보를 가져옵니다. 샘플에서는 filePath 경로에 아래 파일들이 존재하는 것을 가정합니다. + */ + for (int i = 0; i < downloadFileInfoArray.size(); i++) + { + JSONObject downloadFileInfo = (JSONObject)downloadFileInfoArray.get(i); + String fileId = (String)downloadFileInfo.get("fileId"); + + String fileName = ""; + if (fileId.compareTo("FILEID_0001") == 0) + fileName = "나모크로스에디터3_제품소개서.pdf"; + else if (fileId.compareTo("FILEID_0002") == 0) + fileName = "ActiveSquare 7_brochure.pdf"; + else if (fileId.compareTo("FILEID_0003") == 0) + fileName = "130617_나모_펍트리_브로셔_130702.pdf"; + else + throw new Exception("다운로드 할 파일이 없습니다."); + + filePathList.add(filePath + (File.separator + fileName)); + } + + return filePathList; + } + + private String GetFileNameAlias(String fileId) throws Exception + { + /** + * 다운로드 할 파일 설정 + * DB 등에 저장된 파일의 정보를 가져옵니다. 샘플에서는 아래 파일들이 존재하는 것을 가정합니다. + */ + String fileNameAlias = ""; + if (fileId.compareTo("FILEID_0001") == 0) + fileNameAlias = "나모크로스에디터3_제품소개서.pdf"; + else if (fileId.compareTo("FILEID_0002") == 0) + fileNameAlias = "ActiveSquare 7_brochure.pdf"; + else if (fileId.compareTo("FILEID_0003") == 0) + fileNameAlias = "130617_나모_펍트리_브로셔_130702.pdf"; + else + throw new Exception("다운로드 할 파일이 업습니다."); + + return fileNameAlias; + } + + public String CompressFiles(List filePathList) throws IOException + { + final int BUFFER_SIZE = 1024 * 2; + final int COMPRESSION_LEVEL = 9; + String tempZipFilePath = ""; + + File tempZipFile= File.createTempFile("namo_download_", ".tmp"); + FileOutputStream fos = new FileOutputStream(tempZipFile); // FileOutputStream; + BufferedOutputStream bos = new BufferedOutputStream(fos); // BufferedStream + ZipOutputStream zos = new ZipOutputStream(bos); // ZipOutputStream + zos.setLevel(COMPRESSION_LEVEL); // 압축 레벨 - 최대 압축률은 9, 디폴트 8 + + for(int i=0; i \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/GetDownloadFileInfo/DownloadForm.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/GetDownloadFileInfo/DownloadForm.html new file mode 100644 index 00000000..2223622f --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/GetDownloadFileInfo/DownloadForm.html @@ -0,0 +1,99 @@ + + + + + 다운로드 리스트에 추가된 파일의 정보를 가져오는 예제입니다. + + + + + + + + + + + + + + + + + + + + + + + + + +
+
샘플 설명
+
다운로드 리스트에 추가된 파일의 정보를 가져오는 예제입니다.
+
샘플 경로
+
Samples/Others/GetDownloadFileInfo
+

+ +
+ + + +
+
+ + + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/GetDownloadFileInfo/DownloadProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/GetDownloadFileInfo/DownloadProcess.jsp new file mode 100644 index 00000000..7f264cc2 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/GetDownloadFileInfo/DownloadProcess.jsp @@ -0,0 +1,206 @@ +<%@page language="java" contentType="text/html; charset=UTF-8"%> +<%@page import="com.namo.crossuploader.*"%> +<%@page import="java.io.*"%> +<%@page import="java.net.URLEncoder"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> +<%@page import="java.util.List"%> +<%@page import="java.util.ArrayList"%> +<%@page import="java.io.BufferedInputStream"%> +<%@page import="java.io.BufferedOutputStream"%> +<%@page import="java.io.File"%> +<%@page import="java.io.FileInputStream"%> +<%@page import="java.io.FileOutputStream"%> +<%@page import="java.util.zip.ZipEntry"%> +<%@page import="java.util.zip.ZipInputStream"%> +<%@page import="java.util.zip.ZipOutputStream"%> +<%@page import="java.io.FileNotFoundException"%> +<%@page import="java.io.IOException"%> + +<% + out.clear(); + FileDownload fileDownload = new FileDownload(request, response); + + String tempZipFilePath = ""; + + try { + String downloadFormData = request.getParameter("CD_DOWNLOAD_FILE_INFO"); + if (downloadFormData == null) + throw new Exception("다운로드 중 예외가 발생했습니다."); + + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(downloadFormData); + System.out.println("obj : " + obj); + + JSONArray downloadFileInfoArray = (JSONArray)obj; + + + // JSONObject jsonObject = (JSONObject)downloadFileInfoArray.get(i); + // (String)jsonObject.get("fileId"); + // (String)jsonObject.get("fileName"); // 필요할 경우 사용합니다. + // (String)jsonObject.get("fileSize"); // 필요할 경우 사용합니다. + // (String)jsonObject.get("fileUrl"); // 각 파일의 URL이 다르거나 SingleFileDownload일 때 사용됩니다 + + String fileNameAlias = ""; + String filePath = request.getRealPath("/NamoCrossUploaderH5Samples/Samples/Download/DownloadFiles");//서버 환경에 맞게 구성 + + if(downloadFileInfoArray.size() == 1) + { + JSONObject jsonObject = (JSONObject)downloadFileInfoArray.get(0); + fileNameAlias = GetFileNameAlias((String)jsonObject.get("fileId")); + filePath += (File.separator + fileNameAlias); + } + else if(downloadFileInfoArray.size() > 1) + { + List filePathList = GetFilePathList(downloadFileInfoArray, filePath); + + tempZipFilePath = CompressFiles(filePathList); + System.out.println("tempZipFilePath :" + tempZipFilePath); + + filePath = tempZipFilePath; + fileNameAlias = "download.zip"; + } + + + // fileNameAlias는 웹서버 환경에 따라 적절히 인코딩 되어야 합니다. + fileNameAlias = URLEncoder.encode(fileNameAlias, "UTF-8"); + + // attachment 옵션에 따라 파일 종류에 관계 없이 항상 파일 저장 대화상자를 출력할 수 있습니다. + boolean attachment = true; + // resumable 옵션에 따라 파일 이어받기가 가능합니다. + // 클라이언트에서 이어받기 요청이 있어야 하며, 이어받기 요청이 없을 경우 일반 다운로드와 동일하게 동작합니다. + boolean resumable = true; + // filePath에 지정된 파일을 fileNameAlias 이름으로 다운로드 합니다. + fileDownload.startDownload(filePath, fileNameAlias, attachment, resumable); + + + // 다른 유형의 다운로드 함수들 + // startDownload(String filePath); + // startDownload(String filePath, boolean attachment); + // startDownload(String filePath, boolean attachment, boolean resumable); + // startDownload(String filePath, String fileNameAlias); + // startDownload(String filePath, String fileNameAlias, boolean attachment); + // startStreamDownload(InputStream inputStream, String fileNameAlias, long fileSize, boolean attachment); + } + catch(CrossUploaderException ex) { + out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + System.out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + } + catch(FileNotFoundException ex) { + out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + System.out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + } + catch(IOException ex) { + out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + System.out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + } + catch(Exception ex) { + out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + System.out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + } +%><%! + private List GetFilePathList(JSONArray downloadFileInfoArray, String filePath) throws Exception + { + List filePathList = new ArrayList(); + + /** + * 다운로드 할 파일 설정 + * DB 등에 저장된 파일의 정보를 가져옵니다. 샘플에서는 filePath 경로에 아래 파일들이 존재하는 것을 가정합니다. + */ + for (int i = 0; i < downloadFileInfoArray.size(); i++) + { + JSONObject downloadFileInfo = (JSONObject)downloadFileInfoArray.get(i); + System.out.println("GetFilePathList_downloadFileInfo :" + downloadFileInfo); + String fileId = (String)downloadFileInfo.get("fileId"); + System.out.println("GetFilePathList_fileId :" + fileId); + + String fileName = ""; + if (fileId.compareTo("FILEID_0001") == 0) + fileName = "나모크로스에디터3_제품소개서.pdf"; + else if (fileId.compareTo("FILEID_0002") == 0) + fileName = "ActiveSquare 7_brochure.pdf"; + else if (fileId.compareTo("FILEID_0003") == 0) + fileName = "130617_나모_펍트리_브로셔_130702.pdf"; + else + throw new Exception("다운로드 할 파일이 없습니다."); + + filePathList.add(filePath + (File.separator + fileName)); + + System.out.println("GetFilePathList_filePathList :" + filePathList); + } + + return filePathList; + } + + private String GetFileNameAlias(String fileId) throws Exception + { + /** + * 다운로드 할 파일 설정 + * DB 등에 저장된 파일의 정보를 가져옵니다. 샘플에서는 아래 파일들이 존재하는 것을 가정합니다. + */ + String fileNameAlias = ""; + if (fileId.compareTo("FILEID_0001") == 0) + fileNameAlias = "나모크로스에디터3_제품소개서.pdf"; + else if (fileId.compareTo("FILEID_0002") == 0) + fileNameAlias = "ActiveSquare 7_brochure.pdf"; + else if (fileId.compareTo("FILEID_0003") == 0) + fileNameAlias = "130617_나모_펍트리_브로셔_130702.pdf"; + else + throw new Exception("다운로드 할 파일이 업습니다."); + return fileNameAlias; + + } + + public String CompressFiles(List filePathList) throws IOException + { + final int BUFFER_SIZE = 1024 * 2; + final int COMPRESSION_LEVEL = 9; + String tempZipFilePath = ""; + + File tempZipFile= File.createTempFile("namo_download_", ".tmp"); + FileOutputStream fos = new FileOutputStream(tempZipFile); // FileOutputStream; + BufferedOutputStream bos = new BufferedOutputStream(fos); // BufferedStream + ZipOutputStream zos = new ZipOutputStream(bos); // ZipOutputStream + zos.setLevel(COMPRESSION_LEVEL); // 압축 레벨 - 최대 압축률은 9, 디폴트 8 + + for(int i=0; i \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/GetUploadFileInfo/DataProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/GetUploadFileInfo/DataProcess.jsp new file mode 100644 index 00000000..9caa3020 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/GetUploadFileInfo/DataProcess.jsp @@ -0,0 +1,109 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 업로드 된 정보를 출력합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i + +<%! + public void printFileUploadResult(Object obj, PrintWriter writer) { + if(obj == null) + return; + + String html = ""; + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i"; + html += "Name" + (String)jsonObject.get("name") + ""; + html += "File Name" + (String)jsonObject.get("fileName") + ""; + html += "Last Saved Directory Path" + (String)jsonObject.get("lastSavedDirectoryPath") + ""; + html += "Last Saved File Path" + (String)jsonObject.get("lastSavedFilePath") + ""; + html += "Last Saved File Name" + (String)jsonObject.get("lastSavedFileName") + ""; + html += "File Size" + (String)jsonObject.get("fileSize") + ""; + html += "File Name without File Ext" + (String)jsonObject.get("fileNameWithoutFileExt") + ""; + html += "File Extension" + (String)jsonObject.get("fileExtension") + ""; + html += "Content Type" + (String)jsonObject.get("contentType") + ""; + html += "Is Saved" + (String)jsonObject.get("isSaved") + ""; + html += "Is EmptyFile" + (String)jsonObject.get("isEmptyFile") + ""; + html += ""; + } + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/GetUploadFileInfo/ErrorProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/GetUploadFileInfo/ErrorProcess.jsp new file mode 100644 index 00000000..b0b81c7a --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/GetUploadFileInfo/ErrorProcess.jsp @@ -0,0 +1,103 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 기존에 업로드 된 정보를 삭제합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + String osName = System.getProperty("os.name"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i + +<%! + public void printDeletedFilesInfo(String delFile, PrintWriter writer) { + if(delFile == null) + return; + + String html = ""; + html += "
"; + html += ""; + html += ""; + html += "
삭제된 파일 정보
Deleted File" + delFile + "
"; + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/GetUploadFileInfo/UploadForm.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/GetUploadFileInfo/UploadForm.html new file mode 100644 index 00000000..4987b37e --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/GetUploadFileInfo/UploadForm.html @@ -0,0 +1,212 @@ + + + + + 업로드 리스트에 추가된 파일의 정보를 가져오는 예제입니다. + + + + + + + + + + + + + + + + + + + + + + + + + +
+
샘플 설명
+
업로드 리스트에 추가된 파일의 정보를 가져오는 예제입니다.
+
샘플 경로
+
Samples/Others/GetUploadFileInfo
+

+ +
+
+ + +
+ + + +
+
+ + + + + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/GetUploadFileInfo/UploadProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/GetUploadFileInfo/UploadProcess.jsp new file mode 100644 index 00000000..6c4c6fca --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/GetUploadFileInfo/UploadProcess.jsp @@ -0,0 +1,77 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="com.namo.crossuploader.*"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONObject"%> + +<% + PrintWriter writer = response.getWriter(); + FileUpload fileUpload = new FileUpload(request, response); + + try { + // autoMakeDirs를 true로 설정하면 파일 저장 및 이동시 파일생성에 필요한 상위 디렉토리를 모두 생성합니다. + fileUpload.setAutoMakeDirs(true); + + // 파일을 저장할 경로를 설정합니다. + String saveDirPath = request.getRealPath("/"); + saveDirPath += ("UploadDir" + File.separator); + + // saveDirPath에 지정한 경로로 파일 업로드를 시작합니다. + fileUpload.startUpload(saveDirPath); + + // 업로드 경로를 지정하지 않을 경우, 시스템의 임시 디렉토리로 파일 업로드를 시작합니다. + // fileUpload.startUpload(); + + /** + * 입력한 file 태그의 name을 키로 갖는 FileItem[] 객체를 리턴합니다. + * NamoCrossUploader Client Flex Edition의 name은 "CU_FILE" 입니다. + */ + FileItem fileItem = fileUpload.getFileItem("CU_FILE"); + + if(fileItem != null) { + // saveDirPath 경로에 원본 파일명으로 저장(이동)합니다. 동일한 파일명이 존재할 경우 다른 이름으로 저장됩니다. + fileItem.save(saveDirPath); + + // 다른 유형의 저장(이동) 함수들 + /* + save(); + save(String saveDirPath, boolean overwrite); + saveAs(String saveDirPath, String fileName); + saveAs(String saveDirPath, String fileName, boolean overwrite); + */ + + // FileItem 객체로 아래와 같은 정보를 가져올 수 있습니다. 추가적으로 필요한 정보가 있을 경우 JSONObject 객체에 추가해 주십시오. + // 교환할 데이터는 JSON 타입이 아니어도 되며, Javascript에서 파싱할 적절한 형태로 조합하시면 됩니다. + // LastSavedDirectoryPath, LastSavedFileName에는 Windwos 경로에 대한 예외처리가 되어 있습니다. 서버 환경에 맞게 적절히 수정해 주십시오. + JSONObject jsonObject = new JSONObject(); + + jsonObject.put("name", fileItem.getName()); + jsonObject.put("fileName", fileItem.getFileName()); + jsonObject.put("lastSavedDirectoryPath", fileItem.getLastSavedDirPath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFilePath", fileItem.getLastSavedFilePath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFileName", fileItem.getLastSavedFileName()); + jsonObject.put("fileSize", Long.toString(fileItem.getFileSize())); + jsonObject.put("fileNameWithoutFileExt", fileItem.getFileNameWithoutFileExt()); + jsonObject.put("fileExtension", fileItem.getFileExtension()); + jsonObject.put("contentType", fileItem.getContentType()); + jsonObject.put("isSaved", Boolean.toString(fileItem.isSaved())); + jsonObject.put("isEmptyFile", Boolean.toString(fileItem.isEmptyFile())); + + StringWriter stringWriter = new StringWriter(); + jsonObject.writeJSONString(stringWriter); + writer.println(jsonObject.toString()); + } + } + catch(CrossUploaderException ex) { + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + catch(Exception ex) { + // 업로드 외 로직에서 예외 발생시 업로드 중인 모든 파일을 삭제합니다. + fileUpload.deleteUploadedFiles(); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + finally { + // 파일 업로드 객체에서 사용한 자원을 해제합니다. + fileUpload.clear(); + } +%> + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/InitUploadFileInfo/DataProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/InitUploadFileInfo/DataProcess.jsp new file mode 100644 index 00000000..9caa3020 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/InitUploadFileInfo/DataProcess.jsp @@ -0,0 +1,109 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 업로드 된 정보를 출력합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i + +<%! + public void printFileUploadResult(Object obj, PrintWriter writer) { + if(obj == null) + return; + + String html = ""; + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i"; + html += "Name" + (String)jsonObject.get("name") + ""; + html += "File Name" + (String)jsonObject.get("fileName") + ""; + html += "Last Saved Directory Path" + (String)jsonObject.get("lastSavedDirectoryPath") + ""; + html += "Last Saved File Path" + (String)jsonObject.get("lastSavedFilePath") + ""; + html += "Last Saved File Name" + (String)jsonObject.get("lastSavedFileName") + ""; + html += "File Size" + (String)jsonObject.get("fileSize") + ""; + html += "File Name without File Ext" + (String)jsonObject.get("fileNameWithoutFileExt") + ""; + html += "File Extension" + (String)jsonObject.get("fileExtension") + ""; + html += "Content Type" + (String)jsonObject.get("contentType") + ""; + html += "Is Saved" + (String)jsonObject.get("isSaved") + ""; + html += "Is EmptyFile" + (String)jsonObject.get("isEmptyFile") + ""; + html += ""; + } + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/InitUploadFileInfo/ErrorProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/InitUploadFileInfo/ErrorProcess.jsp new file mode 100644 index 00000000..b0b81c7a --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/InitUploadFileInfo/ErrorProcess.jsp @@ -0,0 +1,103 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 기존에 업로드 된 정보를 삭제합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + String osName = System.getProperty("os.name"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i + +<%! + public void printDeletedFilesInfo(String delFile, PrintWriter writer) { + if(delFile == null) + return; + + String html = ""; + html += "
"; + html += ""; + html += ""; + html += "
삭제된 파일 정보
Deleted File" + delFile + "
"; + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/InitUploadFileInfo/UploadForm.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/InitUploadFileInfo/UploadForm.html new file mode 100644 index 00000000..ba9f6e02 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/InitUploadFileInfo/UploadForm.html @@ -0,0 +1,205 @@ + + + + + 업로드 목록 및 전송정보를 초기화 하는 예제입니다. + + + + + + + + + + + + + + + + + + + + + + + + + +
+
샘플 설명
+
+ 업로드 목록 및 전송정보를 초기화 하는 예제입니다.
+ + 전송 중 취소를 하고 초기화를 진행할 경우, 기존에 업로드 된 데이터를 삭제해 주셔야 합니다. "예외처리" 샘플을 참고하여 주십시오.
+ Ajax를 적용하면 화면전환 없이 기존에 업로드 된 파일을 삭제하실 수 있습니다. +
+
+
샘플 경로
+
Samples/Others/InitUploadFileInfo
+

+ +
+
+ + +
+ + + +
+
+ + + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/InitUploadFileInfo/UploadProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/InitUploadFileInfo/UploadProcess.jsp new file mode 100644 index 00000000..6c4c6fca --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Others/InitUploadFileInfo/UploadProcess.jsp @@ -0,0 +1,77 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="com.namo.crossuploader.*"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONObject"%> + +<% + PrintWriter writer = response.getWriter(); + FileUpload fileUpload = new FileUpload(request, response); + + try { + // autoMakeDirs를 true로 설정하면 파일 저장 및 이동시 파일생성에 필요한 상위 디렉토리를 모두 생성합니다. + fileUpload.setAutoMakeDirs(true); + + // 파일을 저장할 경로를 설정합니다. + String saveDirPath = request.getRealPath("/"); + saveDirPath += ("UploadDir" + File.separator); + + // saveDirPath에 지정한 경로로 파일 업로드를 시작합니다. + fileUpload.startUpload(saveDirPath); + + // 업로드 경로를 지정하지 않을 경우, 시스템의 임시 디렉토리로 파일 업로드를 시작합니다. + // fileUpload.startUpload(); + + /** + * 입력한 file 태그의 name을 키로 갖는 FileItem[] 객체를 리턴합니다. + * NamoCrossUploader Client Flex Edition의 name은 "CU_FILE" 입니다. + */ + FileItem fileItem = fileUpload.getFileItem("CU_FILE"); + + if(fileItem != null) { + // saveDirPath 경로에 원본 파일명으로 저장(이동)합니다. 동일한 파일명이 존재할 경우 다른 이름으로 저장됩니다. + fileItem.save(saveDirPath); + + // 다른 유형의 저장(이동) 함수들 + /* + save(); + save(String saveDirPath, boolean overwrite); + saveAs(String saveDirPath, String fileName); + saveAs(String saveDirPath, String fileName, boolean overwrite); + */ + + // FileItem 객체로 아래와 같은 정보를 가져올 수 있습니다. 추가적으로 필요한 정보가 있을 경우 JSONObject 객체에 추가해 주십시오. + // 교환할 데이터는 JSON 타입이 아니어도 되며, Javascript에서 파싱할 적절한 형태로 조합하시면 됩니다. + // LastSavedDirectoryPath, LastSavedFileName에는 Windwos 경로에 대한 예외처리가 되어 있습니다. 서버 환경에 맞게 적절히 수정해 주십시오. + JSONObject jsonObject = new JSONObject(); + + jsonObject.put("name", fileItem.getName()); + jsonObject.put("fileName", fileItem.getFileName()); + jsonObject.put("lastSavedDirectoryPath", fileItem.getLastSavedDirPath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFilePath", fileItem.getLastSavedFilePath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFileName", fileItem.getLastSavedFileName()); + jsonObject.put("fileSize", Long.toString(fileItem.getFileSize())); + jsonObject.put("fileNameWithoutFileExt", fileItem.getFileNameWithoutFileExt()); + jsonObject.put("fileExtension", fileItem.getFileExtension()); + jsonObject.put("contentType", fileItem.getContentType()); + jsonObject.put("isSaved", Boolean.toString(fileItem.isSaved())); + jsonObject.put("isEmptyFile", Boolean.toString(fileItem.isEmptyFile())); + + StringWriter stringWriter = new StringWriter(); + jsonObject.writeJSONString(stringWriter); + writer.println(jsonObject.toString()); + } + } + catch(CrossUploaderException ex) { + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + catch(Exception ex) { + // 업로드 외 로직에서 예외 발생시 업로드 중인 모든 파일을 삭제합니다. + fileUpload.deleteUploadedFiles(); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + finally { + // 파일 업로드 객체에서 사용한 자원을 해제합니다. + fileUpload.clear(); + } +%> + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/SettingUI/SettingFileUploadUI/DataProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/SettingUI/SettingFileUploadUI/DataProcess.jsp new file mode 100644 index 00000000..7514d5d1 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/SettingUI/SettingFileUploadUI/DataProcess.jsp @@ -0,0 +1,108 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 업로드 된 파일 정보를 처리합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i<%! + public void printFileUploadResult(Object obj, PrintWriter writer) { + if(obj == null) + return; + + String html = ""; + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i"; + html += "Name" + (String)jsonObject.get("name") + ""; + html += "File Name" + (String)jsonObject.get("fileName") + ""; + html += "Last Saved Directory Path" + (String)jsonObject.get("lastSavedDirectoryPath") + ""; + html += "Last Saved File Path" + (String)jsonObject.get("lastSavedFilePath") + ""; + html += "Last Saved File Name" + (String)jsonObject.get("lastSavedFileName") + ""; + html += "File Size" + (String)jsonObject.get("fileSize") + ""; + html += "File Name without File Ext" + (String)jsonObject.get("fileNameWithoutFileExt") + ""; + html += "File Extension" + (String)jsonObject.get("fileExtension") + ""; + html += "Content Type" + (String)jsonObject.get("contentType") + ""; + html += "Is Saved" + (String)jsonObject.get("isSaved") + ""; + html += "Is EmptyFile" + (String)jsonObject.get("isEmptyFile") + ""; + html += ""; + } + writer.println(html); + } + + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/SettingUI/SettingFileUploadUI/ErrorProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/SettingUI/SettingFileUploadUI/ErrorProcess.jsp new file mode 100644 index 00000000..aca2ca95 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/SettingUI/SettingFileUploadUI/ErrorProcess.jsp @@ -0,0 +1,101 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 기존에 업로드 된 정보를 삭제합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + String osName = System.getProperty("os.name"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i<%! + public void printDeletedFilesInfo(String delFile, PrintWriter writer) { + if(delFile == null) + return; + + String html = ""; + html += "
"; + html += ""; + html += ""; + html += "
삭제된 파일 정보
Deleted File" + delFile + "
"; + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/SettingUI/SettingFileUploadUI/UploadForm.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/SettingUI/SettingFileUploadUI/UploadForm.html new file mode 100644 index 00000000..49f6c703 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/SettingUI/SettingFileUploadUI/UploadForm.html @@ -0,0 +1,327 @@ + + + + + 파일 업로드 UI를 설정하는 예제입니다. + + + + + + + + + + + + + + + + + + + + + + + + +
+
샘플 설명
+
파일 업로드 UI를 설정하는 예제입니다.
UI 설정 가이드를 위해 코드가 다소 복잡하니 실제 업로드, 다운로드 기능은 해당 샘플을 참고해 주십시오.
+
샘플 경로
+
Samples/SettingUI/SettingFileUploadUI
+

+ + +
+ (아래 표에서 변경할 UI 스타일을 설정해 주십시오.)
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
항목초기 값변경할 값설명
크기 변경가로: 436
세로: 280
가로:
세로:
최초 크기를 지정할 경우 createUploader 메소드의 파라미터를 사용하고, 이후 동적으로 크기를 변경할 경우는 setUiProperties 메소드의 파라미터를 사용해 주십시오. +
"가로, 세로 각각 %, px를 함께 입력할 수 있으며, 입력하지 않을 경우 px 단위로 동작합니다."
메인 보더 컬러 변경#EEEEEE
상단(버튼) 패널 display 상태 변경blockblock
+ none
상단 패널 display 상태가 none일 경우, selectFiles, startUpload 메소드를 사용해 주십시오.
파일선택 버튼의 display 상태 변경blockblock
+ none
파일선택 버튼의 display 상태가 none일 경우, selectFiles 메소드를 사용해 주십시오.
파일선택 버튼의 disabled 상태 변경falsetrue
+ false
파일선택 버튼의 disabled 상태가 true일 경우, selectFiles 메소드를 사용해 주십시오.
업로드 버튼의 display 상태 변경blockblock
+ none
업로드 버튼의 display 상태가 none일 경우, startUpload 메소드를 사용해 주십시오.
업로드 버튼의 disabled 상태 변경falsetrue
+ false
업로드 버튼의 disabled 상태가 true일 경우, startUpload 메소드를 사용해 주십시오.
상태바 파일선택 버튼 display 상태 변경false + true
+ false +
상단 패널 파일선택 버튼의 display 상태가 none일 경우, 상태바 파일선택 버튼 또는 selectFiles 메소드를 사용해 주십시오.
전송 완료 후 모니터 창 닫기 체크박스 설정truetrue
false
+
+
+ +
+
+ + +
+ + +
+
+ + +
+
+ + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/SettingUI/SettingFileUploadUI/UploadProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/SettingUI/SettingFileUploadUI/UploadProcess.jsp new file mode 100644 index 00000000..6c4c6fca --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/SettingUI/SettingFileUploadUI/UploadProcess.jsp @@ -0,0 +1,77 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="com.namo.crossuploader.*"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONObject"%> + +<% + PrintWriter writer = response.getWriter(); + FileUpload fileUpload = new FileUpload(request, response); + + try { + // autoMakeDirs를 true로 설정하면 파일 저장 및 이동시 파일생성에 필요한 상위 디렉토리를 모두 생성합니다. + fileUpload.setAutoMakeDirs(true); + + // 파일을 저장할 경로를 설정합니다. + String saveDirPath = request.getRealPath("/"); + saveDirPath += ("UploadDir" + File.separator); + + // saveDirPath에 지정한 경로로 파일 업로드를 시작합니다. + fileUpload.startUpload(saveDirPath); + + // 업로드 경로를 지정하지 않을 경우, 시스템의 임시 디렉토리로 파일 업로드를 시작합니다. + // fileUpload.startUpload(); + + /** + * 입력한 file 태그의 name을 키로 갖는 FileItem[] 객체를 리턴합니다. + * NamoCrossUploader Client Flex Edition의 name은 "CU_FILE" 입니다. + */ + FileItem fileItem = fileUpload.getFileItem("CU_FILE"); + + if(fileItem != null) { + // saveDirPath 경로에 원본 파일명으로 저장(이동)합니다. 동일한 파일명이 존재할 경우 다른 이름으로 저장됩니다. + fileItem.save(saveDirPath); + + // 다른 유형의 저장(이동) 함수들 + /* + save(); + save(String saveDirPath, boolean overwrite); + saveAs(String saveDirPath, String fileName); + saveAs(String saveDirPath, String fileName, boolean overwrite); + */ + + // FileItem 객체로 아래와 같은 정보를 가져올 수 있습니다. 추가적으로 필요한 정보가 있을 경우 JSONObject 객체에 추가해 주십시오. + // 교환할 데이터는 JSON 타입이 아니어도 되며, Javascript에서 파싱할 적절한 형태로 조합하시면 됩니다. + // LastSavedDirectoryPath, LastSavedFileName에는 Windwos 경로에 대한 예외처리가 되어 있습니다. 서버 환경에 맞게 적절히 수정해 주십시오. + JSONObject jsonObject = new JSONObject(); + + jsonObject.put("name", fileItem.getName()); + jsonObject.put("fileName", fileItem.getFileName()); + jsonObject.put("lastSavedDirectoryPath", fileItem.getLastSavedDirPath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFilePath", fileItem.getLastSavedFilePath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFileName", fileItem.getLastSavedFileName()); + jsonObject.put("fileSize", Long.toString(fileItem.getFileSize())); + jsonObject.put("fileNameWithoutFileExt", fileItem.getFileNameWithoutFileExt()); + jsonObject.put("fileExtension", fileItem.getFileExtension()); + jsonObject.put("contentType", fileItem.getContentType()); + jsonObject.put("isSaved", Boolean.toString(fileItem.isSaved())); + jsonObject.put("isEmptyFile", Boolean.toString(fileItem.isEmptyFile())); + + StringWriter stringWriter = new StringWriter(); + jsonObject.writeJSONString(stringWriter); + writer.println(jsonObject.toString()); + } + } + catch(CrossUploaderException ex) { + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + catch(Exception ex) { + // 업로드 외 로직에서 예외 발생시 업로드 중인 모든 파일을 삭제합니다. + fileUpload.deleteUploadedFiles(); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + finally { + // 파일 업로드 객체에서 사용한 자원을 해제합니다. + fileUpload.clear(); + } +%> + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/SettingUI/SettingMultipleFileDownloadUI/DownloadForm.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/SettingUI/SettingMultipleFileDownloadUI/DownloadForm.html new file mode 100644 index 00000000..cdcac8f2 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/SettingUI/SettingMultipleFileDownloadUI/DownloadForm.html @@ -0,0 +1,208 @@ + + + + + 멀티플 파일 다운로드 UI를 설정하는 예제입니다. + + + + + + + + + + + + + + + + + + + + + + + + + +
+
샘플 설명
+
멀티플 파일 다운로드 UI를 설정하는 예제입니다.
UI 설정 가이드를 위해 코드가 다소 복잡하니 실제 업로드, 다운로드 기능은 해당 샘플을 참고해 주십시오.
+
샘플 경로
+
Samples/SettingUI/SettingMultipleFileDownloadUI
+

+ + +
+ (아래 표에서 변경할 UI 스타일을 설정해 주십시오.)
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
항목초기 값변경할 값설명
크기 변경가로: 436
세로: 280
가로:
세로:
+ 최초 크기를 지정할 경우 createDownloader 메소드의 파라미터를 사용하고, 이후 동적으로 크기를 변경할 경우는 setUiProperties 메소드의 파라미터를 사용해 주십시오. +
"가로, 세로 각각 %, px를 함께 입력할 수 있으며, 입력하지 않을 경우 px 단위로 동작합니다." +
메인 보더 컬러 변경#EEEEEE
하단(버튼) 패널 display 상태 변경block + block
+ none +
하단 패널 display 상태가 none일 경우, startDownload 메소드를 사용해 주십시오.
다운로드 버튼의 display 상태 변경block + block
+ none +
다운로드 버튼의 display 상태가 none일 경우, startDownload 메소드를 사용해 주십시오.
다운로드 버튼의 disabled 상태 변경false + true
+ false +
다운로드 버튼의 disabled 상태가 true일 경우, startDownload 메소드를 사용해 주십시오.
상태바 다운로드 버튼의 display 상태 변경none + block
+ none +
하단 패널 다운로드 버튼의 display 상태가 none일 경우, 상태바 다운로드 버튼 또는 startDownload 메소드를 사용해 주십시오.
상태바 전체 다운로드 버튼의 display 상태 변경none + block
+ none +
상태바 전체 다운로드 버튼의 display 상태가 none일 경우, startDownloadAll 메소드를 사용해 주십시오.
+
+
+ +
+ + +
+
+ +
+
+ + + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/SettingUI/SettingMultipleFileDownloadUI/DownloadProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/SettingUI/SettingMultipleFileDownloadUI/DownloadProcess.jsp new file mode 100644 index 00000000..511541a4 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/SettingUI/SettingMultipleFileDownloadUI/DownloadProcess.jsp @@ -0,0 +1,209 @@ +<%@page language="java" contentType="text/html; charset=UTF-8"%> +<%@page import="com.namo.crossuploader.*"%> +<%@page import="java.io.*"%> +<%@page import="java.net.URLEncoder"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> +<%@page import="java.util.List"%> +<%@page import="java.util.ArrayList"%> +<%@page import="java.io.BufferedInputStream"%> +<%@page import="java.io.BufferedOutputStream"%> +<%@page import="java.io.File"%> +<%@page import="java.io.FileInputStream"%> +<%@page import="java.io.FileOutputStream"%> +<%@page import="java.util.zip.ZipEntry"%> +<%@page import="java.util.zip.ZipInputStream"%> +<%@page import="java.util.zip.ZipOutputStream"%> +<%@page import="java.io.FileNotFoundException"%> +<%@page import="java.io.IOException"%> + +<% + out.clear(); + FileDownload fileDownload = new FileDownload(request, response); + + String tempZipFilePath = ""; + + try { + String downloadFormData = request.getParameter("CD_DOWNLOAD_FILE_INFO"); + if (downloadFormData == null) + throw new Exception("다운로드 중 예외가 발생했습니다."); + + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(downloadFormData); + System.out.println("obj : " + obj); + + //JSONArray downloadFileInfoArray = (JSONArray)obj; + + + // JSONObject jsonObject = (JSONObject)downloadFileInfoArray.get(i); + // (String)jsonObject.get("fileId"); + // (String)jsonObject.get("fileName"); // 필요할 경우 사용합니다. + // (String)jsonObject.get("fileSize"); // 필요할 경우 사용합니다. + // (String)jsonObject.get("fileUrl"); // 각 파일의 URL이 다르거나 SingleFileDownload일 때 사용됩니다 + + String fileNameAlias = ""; + String filePath = request.getRealPath("/NamoCrossUploaderH5Samples/Samples/Download/DownloadFiles");//서버 환경에 맞게 구성 + + JSONArray downloadFileInfoArray = (JSONArray)obj; + + if(downloadFileInfoArray.size() == 1) + { + JSONObject jsonObject = (JSONObject)downloadFileInfoArray.get(0); + fileNameAlias = GetFileNameAlias((String)jsonObject.get("fileId")); + filePath += (File.separator + fileNameAlias); + } + else if(downloadFileInfoArray.size() > 1) + { + List filePathList = GetFilePathList(downloadFileInfoArray, filePath); + + tempZipFilePath = CompressFiles(filePathList); + + filePath = tempZipFilePath; + fileNameAlias = "download.zip"; + } + + + + // fileNameAlias는 웹서버 환경에 따라 적절히 인코딩 되어야 합니다. + fileNameAlias = URLEncoder.encode(fileNameAlias, "UTF-8"); + + // attachment 옵션에 따라 파일 종류에 관계 없이 항상 파일 저장 대화상자를 출력할 수 있습니다. + boolean attachment = true; + // resumable 옵션에 따라 파일 이어받기가 가능합니다. + // 클라이언트에서 이어받기 요청이 있어야 하며, 이어받기 요청이 없을 경우 일반 다운로드와 동일하게 동작합니다. + boolean resumable = true; + // filePath에 지정된 파일을 fileNameAlias 이름으로 다운로드 합니다. + fileDownload.startDownload(filePath, fileNameAlias, attachment, resumable); + + + // 다른 유형의 다운로드 함수들 + // startDownload(String filePath); + // startDownload(String filePath, boolean attachment); + // startDownload(String filePath, boolean attachment, boolean resumable); + // startDownload(String filePath, String fileNameAlias); + // startDownload(String filePath, String fileNameAlias, boolean attachment); + // startStreamDownload(InputStream inputStream, String fileNameAlias, long fileSize, boolean attachment); + } + catch(CrossUploaderException ex) { + out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + System.out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + } + catch(FileNotFoundException ex) { + out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + System.out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + } + catch(IOException ex) { + out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + System.out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + } + catch(Exception ex) { + out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + System.out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + } +%><%! + private List GetFilePathList(JSONArray downloadFileInfoArray, String filePath) throws Exception + { + List filePathList = new ArrayList(); + + /** + * 다운로드 할 파일 설정 + * DB 등에 저장된 파일의 정보를 가져옵니다. 샘플에서는 filePath 경로에 아래 파일들이 존재하는 것을 가정합니다. + */ + for (int i = 0; i < downloadFileInfoArray.size(); i++) + { + JSONObject downloadFileInfo = (JSONObject)downloadFileInfoArray.get(i); + System.out.println("GetFilePathList_downloadFileInfo :" + downloadFileInfo); + String fileId = (String)downloadFileInfo.get("fileId"); + System.out.println("GetFilePathList_fileId :" + fileId); + + String fileName = ""; + if (fileId.compareTo("FILEID_0001") == 0) + fileName = "나모크로스에디터3_제품소개서.pdf"; + else if (fileId.compareTo("FILEID_0002") == 0) + fileName = "ActiveSquare 7_brochure.pdf"; + else if (fileId.compareTo("FILEID_0003") == 0) + fileName = "130617_나모_펍트리_브로셔_130702.pdf"; + else + throw new Exception("다운로드 할 파일이 없습니다."); + + filePathList.add(filePath + (File.separator + fileName)); + + System.out.println("GetFilePathList_filePathList :" + filePathList); + } + + return filePathList; + } + + private String GetFileNameAlias(String fileId) throws Exception + { + /** + * 다운로드 할 파일 설정 + * DB 등에 저장된 파일의 정보를 가져옵니다. 샘플에서는 아래 파일들이 존재하는 것을 가정합니다. + */ + String fileNameAlias = ""; + if (fileId.compareTo("FILEID_0001") == 0) + fileNameAlias = "나모크로스에디터3_제품소개서.pdf"; + else if (fileId.compareTo("FILEID_0002") == 0) + fileNameAlias = "ActiveSquare 7_brochure.pdf"; + else if (fileId.compareTo("FILEID_0003") == 0) + fileNameAlias = "130617_나모_펍트리_브로셔_130702.pdf"; + else + throw new Exception("다운로드 할 파일이 업습니다."); + + return fileNameAlias; + + } + + public String CompressFiles(List filePathList) throws IOException + { + final int BUFFER_SIZE = 1024 * 2; + final int COMPRESSION_LEVEL = 9; + String tempZipFilePath = ""; + + File tempZipFile= File.createTempFile("namo_download_", ".tmp"); + FileOutputStream fos = new FileOutputStream(tempZipFile); // FileOutputStream; + BufferedOutputStream bos = new BufferedOutputStream(fos); // BufferedStream + ZipOutputStream zos = new ZipOutputStream(bos); // ZipOutputStream + zos.setLevel(COMPRESSION_LEVEL); // 압축 레벨 - 최대 압축률은 9, 디폴트 8 + + for(int i=0; i \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/SettingUI/SettingSingleFileDownloadUI/DownloadForm.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/SettingUI/SettingSingleFileDownloadUI/DownloadForm.html new file mode 100644 index 00000000..36c6b59c --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/SettingUI/SettingSingleFileDownloadUI/DownloadForm.html @@ -0,0 +1,130 @@ + + + + + 싱글 파일 다운로드 UI를 설정하는 예제입니다. + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
샘플 설명
+
싱글 파일 다운로드 UI를 설정하는 예제입니다.
UI 설정 가이드를 위해 코드가 다소 복잡하니 실제 업로드, 다운로드 기능은 해당 샘플을 참고해 주십시오.
+
샘플 경로
+
Samples/SettingUI/SettingSingleFileDownloadUI
+

+ + +
+ (아래 표에서 변경할 UI 스타일을 설정해 주십시오.)
+ + + + + + + + + + + + + + + + + + + + + +
항목초기 값변경할 값설명
크기 변경가로: 436
세로: 280
가로:
세로:
+ 최초 크기를 지정할 경우 createDownloader 메소드의 파라미터를 사용하고, 이후 동적으로 크기를 변경할 경우는 setUiProperties 메소드의 파라미터를 사용해 주십시오. +
"가로, 세로 각각 %, px를 함께 입력할 수 있으며, 입력하지 않을 경우 px 단위로 동작합니다." +
메인 보더 컬러 변경#EEEEEE
+
+
+ +
+ + +
+ + + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/SettingUI/SettingSingleFileDownloadUI/DownloadProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/SettingUI/SettingSingleFileDownloadUI/DownloadProcess.jsp new file mode 100644 index 00000000..8fb86f0a --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/SettingUI/SettingSingleFileDownloadUI/DownloadProcess.jsp @@ -0,0 +1,188 @@ +<%@page language="java" contentType="text/html; charset=UTF-8"%> +<%@page import="com.namo.crossuploader.*"%> +<%@page import="java.io.*"%> +<%@page import="java.net.URLEncoder"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> +<%@page import="java.util.List"%> +<%@page import="java.util.ArrayList"%> +<%@page import="java.io.BufferedInputStream"%> +<%@page import="java.io.BufferedOutputStream"%> +<%@page import="java.io.File"%> +<%@page import="java.io.FileInputStream"%> +<%@page import="java.io.FileOutputStream"%> +<%@page import="java.util.zip.ZipEntry"%> +<%@page import="java.util.zip.ZipInputStream"%> +<%@page import="java.util.zip.ZipOutputStream"%> +<%@page import="java.io.FileNotFoundException"%> +<%@page import="java.io.IOException"%> + +<% + out.clear(); + FileDownload fileDownload = new FileDownload(request, response); + + String tempZipFilePath = ""; + + try { + String downloadFormData = request.getParameter("CD_DOWNLOAD_FILE_INFO"); + if (downloadFormData == null) + throw new Exception("다운로드 중 예외가 발생했습니다."); + + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(downloadFormData); + + + //JSONObject jsonObject = (JSONObject)downloadFileInfoArray.get(i); + // (String)jsonObject.get("fileId"); + // (String)jsonObject.get("fileName"); // 필요할 경우 사용합니다. + // (String)jsonObject.get("fileSize"); // 필요할 경우 사용합니다. + //(String)jsonObject.get("fileUrl"); // 각 파일의 URL이 다르거나 SingleFileDownload일 때 사용됩니다 + + String fileNameAlias = ""; + String filePath = request.getRealPath("/NamoCrossUploaderH5Samples/Samples/Download/DownloadFiles");//서버 환경에 맞게 구성 + JSONObject jsonObject = (JSONObject)obj; + fileNameAlias = GetFileNameAlias((String)jsonObject.get("fileId")); + filePath += (File.separator + fileNameAlias); + // fileNameAlias는 웹서버 환경에 따라 적절히 인코딩 되어야 합니다. + fileNameAlias = URLEncoder.encode(fileNameAlias, "UTF-8"); + + // attachment 옵션에 따라 파일 종류에 관계 없이 항상 파일 저장 대화상자를 출력할 수 있습니다. + boolean attachment = true; + // resumable 옵션에 따라 파일 이어받기가 가능합니다. + // 클라이언트에서 이어받기 요청이 있어야 하며, 이어받기 요청이 없을 경우 일반 다운로드와 동일하게 동작합니다. + boolean resumable = true; + // filePath에 지정된 파일을 fileNameAlias 이름으로 다운로드 합니다. + fileDownload.startDownload(filePath, fileNameAlias, attachment, resumable); + + + // 다른 유형의 다운로드 함수들 + // startDownload(String filePath); + // startDownload(String filePath, boolean attachment); + // startDownload(String filePath, boolean attachment, boolean resumable); + // startDownload(String filePath, String fileNameAlias); + // startDownload(String filePath, String fileNameAlias, boolean attachment); + // startStreamDownload(InputStream inputStream, String fileNameAlias, long fileSize, boolean attachment); + } + catch(CrossUploaderException ex) { + out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + System.out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + } + catch(FileNotFoundException ex) { + out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + System.out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + } + catch(IOException ex) { + out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + System.out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + } + catch(Exception ex) { + out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + System.out.println("다운로드 중 예외 발생 : " + ex.getMessage()); + } +%><%! + private List GetFilePathList(JSONArray downloadFileInfoArray, String filePath) throws Exception + { + List filePathList = new ArrayList(); + + /** + * 다운로드 할 파일 설정 + * DB 등에 저장된 파일의 정보를 가져옵니다. 샘플에서는 filePath 경로에 아래 파일들이 존재하는 것을 가정합니다. + */ + for (int i = 0; i < downloadFileInfoArray.size(); i++) + { + JSONObject downloadFileInfo = (JSONObject)downloadFileInfoArray.get(i); + System.out.println("GetFilePathList_downloadFileInfo :" + downloadFileInfo); + String fileId = (String)downloadFileInfo.get("fileId"); + System.out.println("GetFilePathList_fileId :" + fileId); + + String fileName = ""; + if (fileId.compareTo("FILEID_0001") == 0) + fileName = "나모크로스에디터3_제품소개서.pdf"; + else if (fileId.compareTo("FILEID_0002") == 0) + fileName = "ActiveSquare 7_brochure.pdf"; + else if (fileId.compareTo("FILEID_0003") == 0) + fileName = "130617_나모_펍트리_브로셔_130702.pdf"; + else + throw new Exception("다운로드 할 파일이 없습니다."); + + filePathList.add(filePath + (File.separator + fileName)); + + System.out.println("GetFilePathList_filePathList :" + filePathList); + } + + return filePathList; + } + + private String GetFileNameAlias(String fileId) throws Exception + { + /** + * 다운로드 할 파일 설정 + * DB 등에 저장된 파일의 정보를 가져옵니다. 샘플에서는 아래 파일들이 존재하는 것을 가정합니다. + */ + String fileNameAlias = ""; + if (fileId.compareTo("FILEID_0001") == 0) + fileNameAlias = "나모크로스에디터3_제품소개서.pdf"; + else if (fileId.compareTo("FILEID_0002") == 0) + fileNameAlias = "ActiveSquare 7_brochure.pdf"; + else if (fileId.compareTo("FILEID_0003") == 0) + fileNameAlias = "130617_나모_펍트리_브로셔_130702.pdf"; + else + throw new Exception("다운로드 할 파일이 업습니다."); + + return fileNameAlias; + + } + + public String CompressFiles(List filePathList) throws IOException + { + final int BUFFER_SIZE = 1024 * 2; + final int COMPRESSION_LEVEL = 9; + String tempZipFilePath = ""; + + File tempZipFile= File.createTempFile("namo_download_", ".tmp"); + FileOutputStream fos = new FileOutputStream(tempZipFile); // FileOutputStream; + BufferedOutputStream bos = new BufferedOutputStream(fos); // BufferedStream + ZipOutputStream zos = new ZipOutputStream(bos); // ZipOutputStream + zos.setLevel(COMPRESSION_LEVEL); // 압축 레벨 - 최대 압축률은 9, 디폴트 8 + + for(int i=0; i \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/BasicFileUpload/DataProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/BasicFileUpload/DataProcess.jsp new file mode 100644 index 00000000..9caa3020 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/BasicFileUpload/DataProcess.jsp @@ -0,0 +1,109 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 업로드 된 정보를 출력합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i + +<%! + public void printFileUploadResult(Object obj, PrintWriter writer) { + if(obj == null) + return; + + String html = ""; + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i"; + html += "Name" + (String)jsonObject.get("name") + ""; + html += "File Name" + (String)jsonObject.get("fileName") + ""; + html += "Last Saved Directory Path" + (String)jsonObject.get("lastSavedDirectoryPath") + ""; + html += "Last Saved File Path" + (String)jsonObject.get("lastSavedFilePath") + ""; + html += "Last Saved File Name" + (String)jsonObject.get("lastSavedFileName") + ""; + html += "File Size" + (String)jsonObject.get("fileSize") + ""; + html += "File Name without File Ext" + (String)jsonObject.get("fileNameWithoutFileExt") + ""; + html += "File Extension" + (String)jsonObject.get("fileExtension") + ""; + html += "Content Type" + (String)jsonObject.get("contentType") + ""; + html += "Is Saved" + (String)jsonObject.get("isSaved") + ""; + html += "Is EmptyFile" + (String)jsonObject.get("isEmptyFile") + ""; + html += ""; + } + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/BasicFileUpload/ErrorProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/BasicFileUpload/ErrorProcess.jsp new file mode 100644 index 00000000..b0b81c7a --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/BasicFileUpload/ErrorProcess.jsp @@ -0,0 +1,103 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 기존에 업로드 된 정보를 삭제합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + String osName = System.getProperty("os.name"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i + +<%! + public void printDeletedFilesInfo(String delFile, PrintWriter writer) { + if(delFile == null) + return; + + String html = ""; + html += "
"; + html += ""; + html += ""; + html += "
삭제된 파일 정보
Deleted File" + delFile + "
"; + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/BasicFileUpload/UploadForm.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/BasicFileUpload/UploadForm.html new file mode 100644 index 00000000..5a40e11e --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/BasicFileUpload/UploadForm.html @@ -0,0 +1,184 @@ + + + + + 기본적인 파일 업로드 예제입니다. + + + + + + + + + + + + + + + + + + + + + + + + + +
+
샘플 설명
+
기본적인 파일 업로드 예제입니다.
+
샘플 경로
+
Samples/Upload/BasicFileUpload
+

+ +
+
+ + +
+ + +
+ + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/BasicFileUpload/UploadProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/BasicFileUpload/UploadProcess.jsp new file mode 100644 index 00000000..6c4c6fca --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/BasicFileUpload/UploadProcess.jsp @@ -0,0 +1,77 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="com.namo.crossuploader.*"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONObject"%> + +<% + PrintWriter writer = response.getWriter(); + FileUpload fileUpload = new FileUpload(request, response); + + try { + // autoMakeDirs를 true로 설정하면 파일 저장 및 이동시 파일생성에 필요한 상위 디렉토리를 모두 생성합니다. + fileUpload.setAutoMakeDirs(true); + + // 파일을 저장할 경로를 설정합니다. + String saveDirPath = request.getRealPath("/"); + saveDirPath += ("UploadDir" + File.separator); + + // saveDirPath에 지정한 경로로 파일 업로드를 시작합니다. + fileUpload.startUpload(saveDirPath); + + // 업로드 경로를 지정하지 않을 경우, 시스템의 임시 디렉토리로 파일 업로드를 시작합니다. + // fileUpload.startUpload(); + + /** + * 입력한 file 태그의 name을 키로 갖는 FileItem[] 객체를 리턴합니다. + * NamoCrossUploader Client Flex Edition의 name은 "CU_FILE" 입니다. + */ + FileItem fileItem = fileUpload.getFileItem("CU_FILE"); + + if(fileItem != null) { + // saveDirPath 경로에 원본 파일명으로 저장(이동)합니다. 동일한 파일명이 존재할 경우 다른 이름으로 저장됩니다. + fileItem.save(saveDirPath); + + // 다른 유형의 저장(이동) 함수들 + /* + save(); + save(String saveDirPath, boolean overwrite); + saveAs(String saveDirPath, String fileName); + saveAs(String saveDirPath, String fileName, boolean overwrite); + */ + + // FileItem 객체로 아래와 같은 정보를 가져올 수 있습니다. 추가적으로 필요한 정보가 있을 경우 JSONObject 객체에 추가해 주십시오. + // 교환할 데이터는 JSON 타입이 아니어도 되며, Javascript에서 파싱할 적절한 형태로 조합하시면 됩니다. + // LastSavedDirectoryPath, LastSavedFileName에는 Windwos 경로에 대한 예외처리가 되어 있습니다. 서버 환경에 맞게 적절히 수정해 주십시오. + JSONObject jsonObject = new JSONObject(); + + jsonObject.put("name", fileItem.getName()); + jsonObject.put("fileName", fileItem.getFileName()); + jsonObject.put("lastSavedDirectoryPath", fileItem.getLastSavedDirPath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFilePath", fileItem.getLastSavedFilePath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFileName", fileItem.getLastSavedFileName()); + jsonObject.put("fileSize", Long.toString(fileItem.getFileSize())); + jsonObject.put("fileNameWithoutFileExt", fileItem.getFileNameWithoutFileExt()); + jsonObject.put("fileExtension", fileItem.getFileExtension()); + jsonObject.put("contentType", fileItem.getContentType()); + jsonObject.put("isSaved", Boolean.toString(fileItem.isSaved())); + jsonObject.put("isEmptyFile", Boolean.toString(fileItem.isEmptyFile())); + + StringWriter stringWriter = new StringWriter(); + jsonObject.writeJSONString(stringWriter); + writer.println(jsonObject.toString()); + } + } + catch(CrossUploaderException ex) { + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + catch(Exception ex) { + // 업로드 외 로직에서 예외 발생시 업로드 중인 모든 파일을 삭제합니다. + fileUpload.deleteUploadedFiles(); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + finally { + // 파일 업로드 객체에서 사용한 자원을 해제합니다. + fileUpload.clear(); + } +%> + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ExceptionHandling/DataProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ExceptionHandling/DataProcess.jsp new file mode 100644 index 00000000..0649af7b --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ExceptionHandling/DataProcess.jsp @@ -0,0 +1,106 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 업로드 된 정보를 출력합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i<%! + public void printFileUploadResult(Object obj, PrintWriter writer) { + if(obj == null) + return; + + String html = ""; + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i"; + html += "Name" + (String)jsonObject.get("name") + ""; + html += "File Name" + (String)jsonObject.get("fileName") + ""; + html += "Last Saved Directory Path" + (String)jsonObject.get("lastSavedDirectoryPath") + ""; + html += "Last Saved File Path" + (String)jsonObject.get("lastSavedFilePath") + ""; + html += "Last Saved File Name" + (String)jsonObject.get("lastSavedFileName") + ""; + html += "File Size" + (String)jsonObject.get("fileSize") + ""; + html += "File Name without File Ext" + (String)jsonObject.get("fileNameWithoutFileExt") + ""; + html += "File Extension" + (String)jsonObject.get("fileExtension") + ""; + html += "Content Type" + (String)jsonObject.get("contentType") + ""; + html += "Is Saved" + (String)jsonObject.get("isSaved") + ""; + html += "Is EmptyFile" + (String)jsonObject.get("isEmptyFile") + ""; + html += ""; + } + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ExceptionHandling/ErrorProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ExceptionHandling/ErrorProcess.jsp new file mode 100644 index 00000000..aca2ca95 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ExceptionHandling/ErrorProcess.jsp @@ -0,0 +1,101 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 기존에 업로드 된 정보를 삭제합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + String osName = System.getProperty("os.name"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i<%! + public void printDeletedFilesInfo(String delFile, PrintWriter writer) { + if(delFile == null) + return; + + String html = ""; + html += "
"; + html += ""; + html += ""; + html += "
삭제된 파일 정보
Deleted File" + delFile + "
"; + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ExceptionHandling/UploadForm.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ExceptionHandling/UploadForm.html new file mode 100644 index 00000000..1c4cf362 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ExceptionHandling/UploadForm.html @@ -0,0 +1,211 @@ + + + + + Server-Side에서 예외 발생 시 기존 업로드 된 파일을 삭제하는 예제입니다. + + + + + + + + + + + + + + + + + + + + + + + + +
+
샘플 설명
+
+ Server-Side에서 예외 발생 시 기존 업로드 된 파일을 삭제하는 예제입니다.
+ 예외 출력을 위해 + 2번째 파일을 업로드 할 때 Server-Side에서 인위적인 500 예외를 발생시키고 있습니다.
+ 꼭 2개 이상의 파일을 업로드 할 때만 정상적인 동작을 확인하실 수 있습니다. +
+
+ + + + + + + + + + +
[예외처리 방법]
NamoCrossUploader Client HTML5 Edition(이하 Uploader)는 파일 업로드 시 각각의 파일마다 개별적인 Request가 발생됩니다.
전송 도중 예외가 발생할 경우, 업로드 중인 현재 파일은 업로드 요청한 Server-Side 페이지에서 삭제처리 됩니다.
하지만 기존에 업로드를 성공한 파일들은 직접 삭제해 주셔야 합니다.
성공한 각각의 업로드 결과 정보는 Uploader가 저장하고 있습니다. 저장된 정보를 토대로 업로드 된 파일을 삭제해 주십시오.
샘플에서는 2번째 파일에서 인위적으로 예외를 발생시키고 있으며, 업로드 성공한 첫번째 파일을 ErrorProcess.jsp에서 삭제처리하고 있습니다.
(테스트를 위해 2번째 파일임을 인식하기 위한 코드는 임시파일 저장을 활용하고 있습니다)

+ +
샘플 경로
+
Samples/Upload/ExceptionHandling
+

+ +
+
+ + +
+ + +
+ + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ExceptionHandling/UploadProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ExceptionHandling/UploadProcess.jsp new file mode 100644 index 00000000..538bec6d --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ExceptionHandling/UploadProcess.jsp @@ -0,0 +1,110 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="com.namo.crossuploader.*"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONObject"%> +<% String isInitHtml = request.getParameter("isInitHtml"); + if(isInitHtml != null) { + String saveDirPath = request.getRealPath("/"); + saveDirPath += ("UploadDir" + File.separator); + File isSecondFile = new File(saveDirPath + "isSecondFile.session"); + if(isSecondFile.exists() && isSecondFile.isFile()) { + isSecondFile.delete(); + } + } + else { + PrintWriter writer = response.getWriter(); + FileUpload fileUpload = new FileUpload(request, response); + try { + + // autoMakeDirs를 true로 설정하면 파일 저장 및 이동시 파일생성에 필요한 상위 디렉토리를 모두 생성합니다. + fileUpload.setAutoMakeDirs(true); + + // 파일을 저장할 경로를 설정합니다. + String saveDirPath = request.getRealPath("/"); + saveDirPath += ("UploadDir" + File.separator); + + // saveDirPath에 지정한 경로로 파일 업로드를 시작합니다. + fileUpload.startUpload(saveDirPath); + + // 업로드 경로를 지정하지 않을 경우, 시스템의 임시 디렉토리로 파일 업로드를 시작합니다. + // fileUpload.startUpload(); + + /** + * 입력한 file 태그의 name을 키로 갖는 FileItem[] 객체를 리턴합니다. + * NamoCrossUploader Client Flex Edition의 name은 "CU_FILE" 입니다. + */ + FileItem fileItem = fileUpload.getFileItem("CU_FILE"); + + /** + * 예외 테스트를 위해 2번째 파일에서 인위적인 예외를 발생시킵니다. + */ + File isSecondFile = new File(saveDirPath + "isSecondFile.session"); + if(!isSecondFile.exists()) { + isSecondFile.createNewFile(); + } + else if(isSecondFile.exists() && isSecondFile.isFile()) { + isSecondFile.delete(); + throw new Exception("이것은 인위적인 예외입니다."); + } + + /* + // MAC OS의 Safari, Firefox, Opera 이슈로 파일로 대체 + String isSecondFile = (String)session.getAttribute("isSecondFile"); + if(isSecondFile == null || isSecondFile != "YES") { + session.setAttribute("isSecondFile", "YES"); + } + else { + session.setAttribute("isSecondFile", ""); + throw new Exception("이것은 인위적인 예외입니다."); + } + */ + + if(fileItem != null) { + // saveDirPath 경로에 원본 파일명으로 저장(이동)합니다. 동일한 파일명이 존재할 경우 다른 이름으로 저장됩니다. + fileItem.save(saveDirPath); + + // 다른 유형의 저장(이동) 함수들 + /* + save(); + save(String saveDirPath, boolean overwrite); + saveAs(String saveDirPath, String fileName); + saveAs(String saveDirPath, String fileName, boolean overwrite); + */ + + // FileItem 객체로 아래와 같은 정보를 가져올 수 있습니다. 추가적으로 필요한 정보가 있을 경우 JSONObject 객체에 추가해 주십시오. + // 교환할 데이터는 JSON 타입이 아니어도 되며, Javascript에서 파싱할 적절한 형태로 조합하시면 됩니다. + // LastSavedDirectoryPath, LastSavedFileName에는 Windwos 경로에 대한 예외처리가 되어 있습니다. 서버 환경에 맞게 적절히 수정해 주십시오. + JSONObject jsonObject = new JSONObject(); + + jsonObject.put("name", fileItem.getName()); + jsonObject.put("fileName", fileItem.getFileName()); + jsonObject.put("lastSavedDirectoryPath", fileItem.getLastSavedDirPath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFilePath", fileItem.getLastSavedFilePath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFileName", fileItem.getLastSavedFileName()); + jsonObject.put("fileSize", Long.toString(fileItem.getFileSize())); + jsonObject.put("fileNameWithoutFileExt", fileItem.getFileNameWithoutFileExt()); + jsonObject.put("fileExtension", fileItem.getFileExtension()); + jsonObject.put("contentType", fileItem.getContentType()); + jsonObject.put("isSaved", Boolean.toString(fileItem.isSaved())); + jsonObject.put("isEmptyFile", Boolean.toString(fileItem.isEmptyFile())); + + StringWriter stringWriter = new StringWriter(); + jsonObject.writeJSONString(stringWriter); + writer.println(jsonObject.toString()); + } + } + catch(CrossUploaderException ex) { + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + catch(Exception ex) { + // 업로드 외 로직에서 예외 발생시 업로드 중인 모든 파일을 삭제합니다. + fileUpload.deleteUploadedFiles(); + response.getWriter().write(ex.getMessage()); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + finally { + // 파일 업로드 객체에서 사용한 자원을 해제합니다. + fileUpload.clear(); + } + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/FolderUpload/DataProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/FolderUpload/DataProcess.jsp new file mode 100644 index 00000000..4d5fb8a9 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/FolderUpload/DataProcess.jsp @@ -0,0 +1,111 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 업로드 된 정보를 출력합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i + +<%! + public void printFileUploadResult(Object obj, PrintWriter writer) { + if(obj == null) + return; + + String html = ""; + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i"; + html += "Name" + (String)jsonObject.get("name") + ""; + html += "File Name" + (String)jsonObject.get("fileName") + ""; + html += "Source File Directory Path" + (String)jsonObject.get("sourceFileDirectoryPath") + ""; + html += "Last Saved Directory Path" + (String)jsonObject.get("lastSavedDirectoryPath") + ""; + html += "Last Saved File Path" + (String)jsonObject.get("lastSavedFilePath") + ""; + html += "Last Saved File Name" + (String)jsonObject.get("lastSavedFileName") + ""; + html += "File Size" + (String)jsonObject.get("fileSize") + ""; + html += "File Name without File Ext" + (String)jsonObject.get("fileNameWithoutFileExt") + ""; + html += "File Extension" + (String)jsonObject.get("fileExtension") + ""; + html += "Content Type" + (String)jsonObject.get("contentType") + ""; + html += "Is Saved" + (String)jsonObject.get("isSaved") + ""; + html += "Is EmptyFile" + (String)jsonObject.get("isEmptyFile") + ""; + html += ""; + } + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/FolderUpload/ErrorProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/FolderUpload/ErrorProcess.jsp new file mode 100644 index 00000000..b0b81c7a --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/FolderUpload/ErrorProcess.jsp @@ -0,0 +1,103 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 기존에 업로드 된 정보를 삭제합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + String osName = System.getProperty("os.name"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i + +<%! + public void printDeletedFilesInfo(String delFile, PrintWriter writer) { + if(delFile == null) + return; + + String html = ""; + html += "
"; + html += ""; + html += ""; + html += "
삭제된 파일 정보
Deleted File" + delFile + "
"; + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/FolderUpload/UploadForm.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/FolderUpload/UploadForm.html new file mode 100644 index 00000000..132399fc --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/FolderUpload/UploadForm.html @@ -0,0 +1,340 @@ + + + + + 폴더 업로드 예제입니다. + + + + + + + + + + + + + + + + + + + + + + + + + +
+
샘플 설명
+
선택한 폴더를 폴더구조대로 업로드하는 예제입니다. 파일과 폴더를 함께 선택할 수 있습니다.
+
샘플 경로
+
Samples/Upload/FolderUpload
+

+ + +
+ (아래 표에서 변경할 UI 스타일을 설정해 주십시오. 좀 더 다양한 스타일은 "파일 업로드 UI 설정" 샘플을 참고해 주십시오.)
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
항목초기 값변경할 값설명
상단(버튼) 패널 display 상태 변경block + block
+ none +
상단 패널 display 상태가 none일 경우, selectFiles, selectFolder, startUpload 메소드를 사용해 주십시오.
파일선택 버튼의 display 상태 변경block + block
+ none +
파일선택 버튼의 display 상태가 none일 경우, selectFiles 메소드를 사용해 주십시오.
기본값은 block이나, 업로드 객체 생성시 none으로 속성을 변경했습니다. 샘플 소스를 확인해 주십시오.
파일선택 버튼의 disabled 상태 변경false + true
+ false +
파일선택 버튼의 disabled 상태가 true일 경우, selectFiles 메소드를 사용해 주십시오.
폴더선택 버튼의 display 상태 변경none + block
+ none +
폴더선택 버튼의 display 상태가 none일 경우, selectFolder 메소드를 사용해 주십시오.
기본값은 none이나, 업로드 객체 생성시 block으로 속성을 변경했습니다. 샘플 소스를 확인해 주십시오.
폴더선택 버튼의 disabled 상태 변경false + true
+ false +
Folder선택 버튼의 disabled 상태가 true일 경우, selectFolder 메소드를 사용해 주십시오.
업로드 버튼의 display 상태 변경block + block
+ none +
업로드 버튼의 display 상태가 none일 경우, startUpload 메소드를 사용해 주십시오.
업로드 버튼의 disabled 상태 변경false + true
+ false +
업로드 버튼의 disabled 상태가 true일 경우, startUpload 메소드를 사용해 주십시오.
+
+
+ +
+
+ + +
+ + +
+
+ + + +
+
+
+
+ + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/FolderUpload/UploadProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/FolderUpload/UploadProcess.jsp new file mode 100644 index 00000000..6beb5453 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/FolderUpload/UploadProcess.jsp @@ -0,0 +1,83 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="com.namo.crossuploader.*"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONObject"%> + +<% + PrintWriter writer = response.getWriter(); + FileUpload fileUpload = new FileUpload(request, response); + + try { + // autoMakeDirs를 true로 설정하면 파일 저장 및 이동시 파일생성에 필요한 상위 디렉토리를 모두 생성합니다. + fileUpload.setAutoMakeDirs(true); + + // 파일을 저장할 경로를 설정합니다. + String saveDirPath = request.getRealPath("/"); + saveDirPath += ("UploadDir" + File.separator); + + // saveDirPath에 지정한 경로로 파일 업로드를 시작합니다. + fileUpload.startUpload(saveDirPath); + + // 업로드 경로를 지정하지 않을 경우, 시스템의 임시 디렉토리로 파일 업로드를 시작합니다. + // fileUpload.startUpload(); + + /** + * 입력한 file 태그의 name을 키로 갖는 FileItem[] 객체를 리턴합니다. + * NamoCrossUploader Client Flex Edition의 name은 "CU_FILE" 입니다. + */ + FileItem fileItem = fileUpload.getFileItem("CU_FILE"); + + if(fileItem != null) { + // saveDirPath 경로에 폴더를 생성하고 원본 파일명으로 저장(이동)합니다. 동일한 파일명이 존재할 경우 다른 이름으로 저장됩니다. + // 다른 경로에 폴더 구조로 업로드 하기 위해서는 아래와 같이 수정해 주십시오. + /* + string sourceFileDirectoryPath = fileItem.getSourceFileDirectoryPath(); + fileItem.save(saveDirPath + sourceFileDirectoryPath); + */ + fileItem.save(); + + // 다른 유형의 저장(이동) 함수들 + /* + save(String saveDirPath); + save(String saveDirPath, bool overwrite); + saveAs(String saveDirPath, String fileName); + saveAs(String saveDirPath, String fileName, bool overwrite); + */ + + // FileItem 객체로 아래와 같은 정보를 가져올 수 있습니다. 추가적으로 필요한 정보가 있을 경우 JSONObject 객체에 추가해 주십시오. + // 교환할 데이터는 JSON 타입이 아니어도 되며, Javascript에서 파싱할 적절한 형태로 조합하시면 됩니다. + // LastSavedDirectoryPath, LastSavedFileName에는 Windwos 경로에 대한 예외처리가 되어 있습니다. 서버 환경에 맞게 적절히 수정해 주십시오. + JSONObject jsonObject = new JSONObject(); + + jsonObject.put("name", fileItem.getName()); + jsonObject.put("fileName", fileItem.getFileName()); + jsonObject.put("sourceFileDirectoryPath", fileItem.getSourceFileDirectoryPath()); + jsonObject.put("lastSavedDirectoryPath", fileItem.getLastSavedDirPath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFilePath", fileItem.getLastSavedFilePath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFileName", fileItem.getLastSavedFileName()); + jsonObject.put("fileSize", Long.toString(fileItem.getFileSize())); + jsonObject.put("fileNameWithoutFileExt", fileItem.getFileNameWithoutFileExt()); + jsonObject.put("fileExtension", fileItem.getFileExtension()); + jsonObject.put("contentType", fileItem.getContentType()); + jsonObject.put("isSaved", Boolean.toString(fileItem.isSaved())); + jsonObject.put("isEmptyFile", Boolean.toString(fileItem.isEmptyFile())); + + StringWriter stringWriter = new StringWriter(); + jsonObject.writeJSONString(stringWriter); + writer.println(jsonObject.toString()); + } + } + catch(CrossUploaderException ex) { + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + catch(Exception ex) { + // 업로드 외 로직에서 예외 발생시 업로드 중인 모든 파일을 삭제합니다. + fileUpload.deleteUploadedFiles(); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + finally { + // 파일 업로드 객체에서 사용한 자원을 해제합니다. + fileUpload.clear(); + } +%> + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ImagePreview/DataProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ImagePreview/DataProcess.jsp new file mode 100644 index 00000000..9caa3020 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ImagePreview/DataProcess.jsp @@ -0,0 +1,109 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 업로드 된 정보를 출력합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i + +<%! + public void printFileUploadResult(Object obj, PrintWriter writer) { + if(obj == null) + return; + + String html = ""; + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i"; + html += "Name" + (String)jsonObject.get("name") + ""; + html += "File Name" + (String)jsonObject.get("fileName") + ""; + html += "Last Saved Directory Path" + (String)jsonObject.get("lastSavedDirectoryPath") + ""; + html += "Last Saved File Path" + (String)jsonObject.get("lastSavedFilePath") + ""; + html += "Last Saved File Name" + (String)jsonObject.get("lastSavedFileName") + ""; + html += "File Size" + (String)jsonObject.get("fileSize") + ""; + html += "File Name without File Ext" + (String)jsonObject.get("fileNameWithoutFileExt") + ""; + html += "File Extension" + (String)jsonObject.get("fileExtension") + ""; + html += "Content Type" + (String)jsonObject.get("contentType") + ""; + html += "Is Saved" + (String)jsonObject.get("isSaved") + ""; + html += "Is EmptyFile" + (String)jsonObject.get("isEmptyFile") + ""; + html += ""; + } + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ImagePreview/ErrorProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ImagePreview/ErrorProcess.jsp new file mode 100644 index 00000000..b0b81c7a --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ImagePreview/ErrorProcess.jsp @@ -0,0 +1,103 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 기존에 업로드 된 정보를 삭제합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + String osName = System.getProperty("os.name"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i + +<%! + public void printDeletedFilesInfo(String delFile, PrintWriter writer) { + if(delFile == null) + return; + + String html = ""; + html += "
"; + html += ""; + html += ""; + html += "
삭제된 파일 정보
Deleted File" + delFile + "
"; + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ImagePreview/UploadForm.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ImagePreview/UploadForm.html new file mode 100644 index 00000000..fe471745 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ImagePreview/UploadForm.html @@ -0,0 +1,354 @@ + + + + + 업로드 전 이미지 파일을 미리보기 할 수 있는 예제입니다. + + + + + + + + + + + + + + + + + + + + + + + + + +
+
샘플 설명
+
업로드 전 이미지 파일을 미리보기 할 수 있는 예제입니다. 미리보기 할 파일을 더블클릭 해주십시오.

+ 이미지 뷰어는 내부 이미지 뷰어와 사용자가 직접 제작한 이미지 뷰어를 선택해서 사용하실 수 있습니다.
+ 내부 이미지 뷰어에서 지원하는 이미지 포맷은 "png, jpg, jpeg, ico, gif, bmp" 입니다.
+ 사용자 정의 이미지 뷰어를 사용할 경우, 다양한 이미지 뷰어 UI를 직접 구성하실 수 있고, 추가적인 이미지 포맷(테스트 필요)을 지원할 수도 있습니다.

+ + 내부 이미지 뷰어, 사용자 정의 이미지 뷰어 모두 그리드 더블클릭 이벤트 발생 시점에 호출하고 있으며,
+ 더블클릭 이벤트가 아니더라도 적절한 시점에 해당 이미지 뷰어를 호출하실 수 있습니다. +
+
샘플 경로
+
Samples/Upload/ImagePreview
+

+ + +
+
+ 내부 이미지 뷰어 + 사용자 정의 이미지 뷰어 +

+ +
+ + +
+ + + + +
+ +
+
+ your image + +
+ +
+ + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ImagePreview/UploadProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ImagePreview/UploadProcess.jsp new file mode 100644 index 00000000..6c4c6fca --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ImagePreview/UploadProcess.jsp @@ -0,0 +1,77 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="com.namo.crossuploader.*"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONObject"%> + +<% + PrintWriter writer = response.getWriter(); + FileUpload fileUpload = new FileUpload(request, response); + + try { + // autoMakeDirs를 true로 설정하면 파일 저장 및 이동시 파일생성에 필요한 상위 디렉토리를 모두 생성합니다. + fileUpload.setAutoMakeDirs(true); + + // 파일을 저장할 경로를 설정합니다. + String saveDirPath = request.getRealPath("/"); + saveDirPath += ("UploadDir" + File.separator); + + // saveDirPath에 지정한 경로로 파일 업로드를 시작합니다. + fileUpload.startUpload(saveDirPath); + + // 업로드 경로를 지정하지 않을 경우, 시스템의 임시 디렉토리로 파일 업로드를 시작합니다. + // fileUpload.startUpload(); + + /** + * 입력한 file 태그의 name을 키로 갖는 FileItem[] 객체를 리턴합니다. + * NamoCrossUploader Client Flex Edition의 name은 "CU_FILE" 입니다. + */ + FileItem fileItem = fileUpload.getFileItem("CU_FILE"); + + if(fileItem != null) { + // saveDirPath 경로에 원본 파일명으로 저장(이동)합니다. 동일한 파일명이 존재할 경우 다른 이름으로 저장됩니다. + fileItem.save(saveDirPath); + + // 다른 유형의 저장(이동) 함수들 + /* + save(); + save(String saveDirPath, boolean overwrite); + saveAs(String saveDirPath, String fileName); + saveAs(String saveDirPath, String fileName, boolean overwrite); + */ + + // FileItem 객체로 아래와 같은 정보를 가져올 수 있습니다. 추가적으로 필요한 정보가 있을 경우 JSONObject 객체에 추가해 주십시오. + // 교환할 데이터는 JSON 타입이 아니어도 되며, Javascript에서 파싱할 적절한 형태로 조합하시면 됩니다. + // LastSavedDirectoryPath, LastSavedFileName에는 Windwos 경로에 대한 예외처리가 되어 있습니다. 서버 환경에 맞게 적절히 수정해 주십시오. + JSONObject jsonObject = new JSONObject(); + + jsonObject.put("name", fileItem.getName()); + jsonObject.put("fileName", fileItem.getFileName()); + jsonObject.put("lastSavedDirectoryPath", fileItem.getLastSavedDirPath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFilePath", fileItem.getLastSavedFilePath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFileName", fileItem.getLastSavedFileName()); + jsonObject.put("fileSize", Long.toString(fileItem.getFileSize())); + jsonObject.put("fileNameWithoutFileExt", fileItem.getFileNameWithoutFileExt()); + jsonObject.put("fileExtension", fileItem.getFileExtension()); + jsonObject.put("contentType", fileItem.getContentType()); + jsonObject.put("isSaved", Boolean.toString(fileItem.isSaved())); + jsonObject.put("isEmptyFile", Boolean.toString(fileItem.isEmptyFile())); + + StringWriter stringWriter = new StringWriter(); + jsonObject.writeJSONString(stringWriter); + writer.println(jsonObject.toString()); + } + } + catch(CrossUploaderException ex) { + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + catch(Exception ex) { + // 업로드 외 로직에서 예외 발생시 업로드 중인 모든 파일을 삭제합니다. + fileUpload.deleteUploadedFiles(); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + finally { + // 파일 업로드 객체에서 사용한 자원을 해제합니다. + fileUpload.clear(); + } +%> + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LargeFileUpload/ConfigProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LargeFileUpload/ConfigProcess.jsp new file mode 100644 index 00000000..d29d3e5e --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LargeFileUpload/ConfigProcess.jsp @@ -0,0 +1,35 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="com.namo.crossuploader.*"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONObject"%> + +<% + PrintWriter writer = response.getWriter(); + FileUpload fileUpload = new FileUpload(request, response); + + try + { + // 파일을 저장할 경로를 설정합니다. + String saveDirPath = request.getRealPath("/"); + saveDirPath += ("UploadDir" + File.separator); + + // saveDirPath에 지정한 경로에서 이전에 올린 파일 정보를 체크 합니다. + fileUpload.startConfig(saveDirPath); + } + catch(CrossUploaderException ex) + { + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + catch(Exception ex) + { + // 업로드 외 로직에서 예외 발생시 업로드 중인 모든 파일을 삭제합니다. + fileUpload.deleteUploadedFiles(); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + finally + { + // 파일 업로드 객체에서 사용한 자원을 해제합니다. + fileUpload.clear(); + } +%> + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LargeFileUpload/DataProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LargeFileUpload/DataProcess.jsp new file mode 100644 index 00000000..9caa3020 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LargeFileUpload/DataProcess.jsp @@ -0,0 +1,109 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 업로드 된 정보를 출력합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i + +<%! + public void printFileUploadResult(Object obj, PrintWriter writer) { + if(obj == null) + return; + + String html = ""; + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i"; + html += "Name" + (String)jsonObject.get("name") + ""; + html += "File Name" + (String)jsonObject.get("fileName") + ""; + html += "Last Saved Directory Path" + (String)jsonObject.get("lastSavedDirectoryPath") + ""; + html += "Last Saved File Path" + (String)jsonObject.get("lastSavedFilePath") + ""; + html += "Last Saved File Name" + (String)jsonObject.get("lastSavedFileName") + ""; + html += "File Size" + (String)jsonObject.get("fileSize") + ""; + html += "File Name without File Ext" + (String)jsonObject.get("fileNameWithoutFileExt") + ""; + html += "File Extension" + (String)jsonObject.get("fileExtension") + ""; + html += "Content Type" + (String)jsonObject.get("contentType") + ""; + html += "Is Saved" + (String)jsonObject.get("isSaved") + ""; + html += "Is EmptyFile" + (String)jsonObject.get("isEmptyFile") + ""; + html += ""; + } + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LargeFileUpload/ErrorProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LargeFileUpload/ErrorProcess.jsp new file mode 100644 index 00000000..b0b81c7a --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LargeFileUpload/ErrorProcess.jsp @@ -0,0 +1,103 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 기존에 업로드 된 정보를 삭제합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + String osName = System.getProperty("os.name"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i + +<%! + public void printDeletedFilesInfo(String delFile, PrintWriter writer) { + if(delFile == null) + return; + + String html = ""; + html += "
"; + html += ""; + html += ""; + html += "
삭제된 파일 정보
Deleted File" + delFile + "
"; + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LargeFileUpload/UploadForm.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LargeFileUpload/UploadForm.html new file mode 100644 index 00000000..317ed098 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LargeFileUpload/UploadForm.html @@ -0,0 +1,207 @@ + + + + + 개별 파일크기 2GB 이상을 지원하는 대용량 파일 업로드 예제입니다. + + + + + + + + + + + + + + + + + + + + + + + + + +
+
샘플 설명
+
개별 파일크기 2GB 이상을 지원하는 대용량 파일 업로드 예제입니다.
+
샘플 경로
+
Samples/Upload/LargeFileUpload
+

+ +
+
+ + +
+ + +
+ + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LargeFileUpload/UploadProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LargeFileUpload/UploadProcess.jsp new file mode 100644 index 00000000..8a8f54bf --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LargeFileUpload/UploadProcess.jsp @@ -0,0 +1,81 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="com.namo.crossuploader.*"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONObject"%> + +<% + PrintWriter writer = response.getWriter(); + FileUpload fileUpload = new FileUpload(request, response); + + try + { + // autoMakeDirs를 true로 설정하면 파일 저장 및 이동시 파일생성에 필요한 상위 디렉토리를 모두 생성합니다. + fileUpload.setAutoMakeDirs(true); + + // 파일을 저장할 경로를 설정합니다. + String saveDirPath = request.getRealPath("/"); + saveDirPath += ("UploadDir" + File.separator); + + // saveDirPath에 지정한 경로로 파일 업로드를 시작합니다. + fileUpload.startLargeUpload(saveDirPath); + + // 업로드 경로를 지정하지 않을 경우, 시스템의 임시 디렉토리로 파일 업로드를 시작합니다. + // fileUpload.startLargeUpload(); + + if (fileUpload.getLargeUploadStatus() == "COMPLETION") + { + FileItem fileItem = fileUpload.getFileItem("CU_FILE"); + + if(fileItem != null) { + // saveDirPath 경로에 원본 파일명으로 저장(이동)합니다. 동일한 파일명이 존재할 경우 다른 이름으로 저장됩니다. + fileItem.save(saveDirPath); + + // 다른 유형의 저장(이동) 함수들 + /* + save(); + save(String saveDirPath, boolean overwrite); + saveAs(String saveDirPath, String fileName); + saveAs(String saveDirPath, String fileName, boolean overwrite); + */ + + // FileItem 객체로 아래와 같은 정보를 가져올 수 있습니다. 추가적으로 필요한 정보가 있을 경우 JSONObject 객체에 추가해 주십시오. + // 교환할 데이터는 JSON 타입이 아니어도 되며, Javascript에서 파싱할 적절한 형태로 조합하시면 됩니다. + // LastSavedDirectoryPath, LastSavedFileName에는 Windwos 경로에 대한 예외처리가 되어 있습니다. 서버 환경에 맞게 적절히 수정해 주십시오. + JSONObject jsonObject = new JSONObject(); + + jsonObject.put("largeUploadStatus", fileUpload.getLargeUploadStatus()); // "largeUploadStatus"는 내부적으로 사용되는 이름입니다. 그대도 유지해 주십시오. + jsonObject.put("name", fileItem.getName()); + jsonObject.put("fileName", fileItem.getFileName()); + jsonObject.put("lastSavedDirectoryPath", fileItem.getLastSavedDirPath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFilePath", fileItem.getLastSavedFilePath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFileName", fileItem.getLastSavedFileName()); + jsonObject.put("fileSize", Long.toString(fileItem.getFileSize())); + jsonObject.put("fileNameWithoutFileExt", fileItem.getFileNameWithoutFileExt()); + jsonObject.put("fileExtension", fileItem.getFileExtension()); + jsonObject.put("contentType", fileItem.getContentType()); + jsonObject.put("isSaved", Boolean.toString(fileItem.isSaved())); + jsonObject.put("isEmptyFile", Boolean.toString(fileItem.isEmptyFile())); + + StringWriter stringWriter = new StringWriter(); + jsonObject.writeJSONString(stringWriter); + writer.println(jsonObject.toString()); + } + } + } + catch(CrossUploaderException ex) + { + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + catch(Exception ex) + { + // 업로드 외 로직에서 예외 발생시 업로드 중인 모든 파일을 삭제합니다. + fileUpload.deleteUploadedFiles(); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + finally + { + // 파일 업로드 객체에서 사용한 자원을 해제합니다. + fileUpload.clear(); + } +%> + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LimitFileUpload/DataProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LimitFileUpload/DataProcess.jsp new file mode 100644 index 00000000..9caa3020 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LimitFileUpload/DataProcess.jsp @@ -0,0 +1,109 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 업로드 된 정보를 출력합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i + +<%! + public void printFileUploadResult(Object obj, PrintWriter writer) { + if(obj == null) + return; + + String html = ""; + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i"; + html += "Name" + (String)jsonObject.get("name") + ""; + html += "File Name" + (String)jsonObject.get("fileName") + ""; + html += "Last Saved Directory Path" + (String)jsonObject.get("lastSavedDirectoryPath") + ""; + html += "Last Saved File Path" + (String)jsonObject.get("lastSavedFilePath") + ""; + html += "Last Saved File Name" + (String)jsonObject.get("lastSavedFileName") + ""; + html += "File Size" + (String)jsonObject.get("fileSize") + ""; + html += "File Name without File Ext" + (String)jsonObject.get("fileNameWithoutFileExt") + ""; + html += "File Extension" + (String)jsonObject.get("fileExtension") + ""; + html += "Content Type" + (String)jsonObject.get("contentType") + ""; + html += "Is Saved" + (String)jsonObject.get("isSaved") + ""; + html += "Is EmptyFile" + (String)jsonObject.get("isEmptyFile") + ""; + html += ""; + } + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LimitFileUpload/ErrorProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LimitFileUpload/ErrorProcess.jsp new file mode 100644 index 00000000..b0b81c7a --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LimitFileUpload/ErrorProcess.jsp @@ -0,0 +1,103 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 기존에 업로드 된 정보를 삭제합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + String osName = System.getProperty("os.name"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i + +<%! + public void printDeletedFilesInfo(String delFile, PrintWriter writer) { + if(delFile == null) + return; + + String html = ""; + html += "
"; + html += ""; + html += ""; + html += "
삭제된 파일 정보
Deleted File" + delFile + "
"; + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LimitFileUpload/UploadForm.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LimitFileUpload/UploadForm.html new file mode 100644 index 00000000..7b5defa2 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LimitFileUpload/UploadForm.html @@ -0,0 +1,222 @@ + + + + + 파일 확장자, 파일 개수, 전체 파일 크기 및 개별 파일 크기를 제한하는 예제입니다. + + + + + + + + + + + + + + + + + + + + + + + + + +
+
샘플 설명
+
파일 확장자, 파일 개수, 전체 파일 크기 및 개별 파일 크기를 제한하는 예제입니다.
+ + + + + + + + + +
[업로드 제한 정보]
파일 필터: txt, jpg, jpeg
허용하지 않을 파일 확장자: exe, cgi, sql (대소문자를 구분하지 않으며, 허용할 파일 확장자와 허용하지 않을 파일 확장자를 선택적으로 설정 가능합니다)
파일 개수 제한: 5 개
개별 파일 크기 제한: 5 MB
전체 파일 크기 제한: 10 MB

+ +
샘플 경로
+
Samples/Upload/LimitFileUpload
+

+ +
+
+ + +
+ + +
+ + + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LimitFileUpload/UploadProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LimitFileUpload/UploadProcess.jsp new file mode 100644 index 00000000..6c4c6fca --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/LimitFileUpload/UploadProcess.jsp @@ -0,0 +1,77 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="com.namo.crossuploader.*"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONObject"%> + +<% + PrintWriter writer = response.getWriter(); + FileUpload fileUpload = new FileUpload(request, response); + + try { + // autoMakeDirs를 true로 설정하면 파일 저장 및 이동시 파일생성에 필요한 상위 디렉토리를 모두 생성합니다. + fileUpload.setAutoMakeDirs(true); + + // 파일을 저장할 경로를 설정합니다. + String saveDirPath = request.getRealPath("/"); + saveDirPath += ("UploadDir" + File.separator); + + // saveDirPath에 지정한 경로로 파일 업로드를 시작합니다. + fileUpload.startUpload(saveDirPath); + + // 업로드 경로를 지정하지 않을 경우, 시스템의 임시 디렉토리로 파일 업로드를 시작합니다. + // fileUpload.startUpload(); + + /** + * 입력한 file 태그의 name을 키로 갖는 FileItem[] 객체를 리턴합니다. + * NamoCrossUploader Client Flex Edition의 name은 "CU_FILE" 입니다. + */ + FileItem fileItem = fileUpload.getFileItem("CU_FILE"); + + if(fileItem != null) { + // saveDirPath 경로에 원본 파일명으로 저장(이동)합니다. 동일한 파일명이 존재할 경우 다른 이름으로 저장됩니다. + fileItem.save(saveDirPath); + + // 다른 유형의 저장(이동) 함수들 + /* + save(); + save(String saveDirPath, boolean overwrite); + saveAs(String saveDirPath, String fileName); + saveAs(String saveDirPath, String fileName, boolean overwrite); + */ + + // FileItem 객체로 아래와 같은 정보를 가져올 수 있습니다. 추가적으로 필요한 정보가 있을 경우 JSONObject 객체에 추가해 주십시오. + // 교환할 데이터는 JSON 타입이 아니어도 되며, Javascript에서 파싱할 적절한 형태로 조합하시면 됩니다. + // LastSavedDirectoryPath, LastSavedFileName에는 Windwos 경로에 대한 예외처리가 되어 있습니다. 서버 환경에 맞게 적절히 수정해 주십시오. + JSONObject jsonObject = new JSONObject(); + + jsonObject.put("name", fileItem.getName()); + jsonObject.put("fileName", fileItem.getFileName()); + jsonObject.put("lastSavedDirectoryPath", fileItem.getLastSavedDirPath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFilePath", fileItem.getLastSavedFilePath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFileName", fileItem.getLastSavedFileName()); + jsonObject.put("fileSize", Long.toString(fileItem.getFileSize())); + jsonObject.put("fileNameWithoutFileExt", fileItem.getFileNameWithoutFileExt()); + jsonObject.put("fileExtension", fileItem.getFileExtension()); + jsonObject.put("contentType", fileItem.getContentType()); + jsonObject.put("isSaved", Boolean.toString(fileItem.isSaved())); + jsonObject.put("isEmptyFile", Boolean.toString(fileItem.isEmptyFile())); + + StringWriter stringWriter = new StringWriter(); + jsonObject.writeJSONString(stringWriter); + writer.println(jsonObject.toString()); + } + } + catch(CrossUploaderException ex) { + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + catch(Exception ex) { + // 업로드 외 로직에서 예외 발생시 업로드 중인 모든 파일을 삭제합니다. + fileUpload.deleteUploadedFiles(); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + finally { + // 파일 업로드 객체에서 사용한 자원을 해제합니다. + fileUpload.clear(); + } +%> + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ModifiedFileUpload/DataProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ModifiedFileUpload/DataProcess.jsp new file mode 100644 index 00000000..0095e5c8 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ModifiedFileUpload/DataProcess.jsp @@ -0,0 +1,186 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + /** + * 폼 데이터 정보를 처리합니다. + */ + String textTitle = request.getParameter("textTitle"); // 제목 + String radioCate = request.getParameter("radioCate"); // 게시판 선택 + String[] checkInter = request.getParameterValues("checkInter"); // 관심 분야 + String memoTextarea = request.getParameter("memoTextarea"); // 메모 + printFormUploadResult(textTitle, radioCate, checkInter, memoTextarea, writer); + + + try { + /** + * 업로드 된 정보를 출력합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i + + +<%! + public void printFileUploadResult(Object obj, PrintWriter writer) { + if(obj == null) + return; + + String html = ""; + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i"; + html += "Name" + (String)jsonObject.get("name") + ""; + html += "File Name" + (String)jsonObject.get("fileName") + ""; + html += "Last Saved Directory Path" + (String)jsonObject.get("lastSavedDirectoryPath") + ""; + html += "Last Saved File Path" + (String)jsonObject.get("lastSavedFilePath") + ""; + html += "Last Saved File Name" + (String)jsonObject.get("lastSavedFileName") + ""; + html += "File Size" + (String)jsonObject.get("fileSize") + ""; + html += "File Name without File Ext" + (String)jsonObject.get("fileNameWithoutFileExt") + ""; + html += "File Extension" + (String)jsonObject.get("fileExtension") + ""; + html += "Content Type" + (String)jsonObject.get("contentType") + ""; + html += "Is Saved" + (String)jsonObject.get("isSaved") + ""; + html += "Is EmptyFile" + (String)jsonObject.get("isEmptyFile") + ""; + html += ""; + } + writer.println(html); + } + + + public void printFormUploadResult(String textTitle, String radioCate, String[] checkInter, String memoTextarea, PrintWriter writer) { + String html = "
"; + html += ""; + if(textTitle != null) + html += ""; + if(radioCate != null) + html += ""; + if(checkInter != null) { + for(int i=0; i"; + } + if(memoTextarea != null) + html += ""; + + html += "
폼 데이터 업로드 정보
제목" + textTitle + "
게시판 선택" + radioCate + "
" + checkInter[i] + "
메모" + memoTextarea + "
"; + + writer.println(html); + } + + public void printModifiedFileUploadResult(Object obj, PrintWriter writer) { + if(obj == null) + return; + + String html = ""; + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i"; + html += "File Id" + (String)jsonObject.get("fileId") + ""; + html += "File Name" + (String)jsonObject.get("fileName") + ""; + html += "File Size" + (String)jsonObject.get("fileSize") + ""; + html += "Is Deleted" + (String)jsonObject.get("isDeleted") + ""; + html += ""; + } + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ModifiedFileUpload/ErrorProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ModifiedFileUpload/ErrorProcess.jsp new file mode 100644 index 00000000..b0b81c7a --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ModifiedFileUpload/ErrorProcess.jsp @@ -0,0 +1,103 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 기존에 업로드 된 정보를 삭제합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + String osName = System.getProperty("os.name"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i + +<%! + public void printDeletedFilesInfo(String delFile, PrintWriter writer) { + if(delFile == null) + return; + + String html = ""; + html += "
"; + html += ""; + html += ""; + html += "
삭제된 파일 정보
Deleted File" + delFile + "
"; + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ModifiedFileUpload/UploadForm.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ModifiedFileUpload/UploadForm.html new file mode 100644 index 00000000..154274ef --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ModifiedFileUpload/UploadForm.html @@ -0,0 +1,272 @@ + + + + + 게시판 수정 모드 시 기존 업로드한 파일을 삭제 및 새로운 파일을 추가하는 예제입니다. + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
샘플 설명
+
게시판 수정 모드 시 기존 업로드한 파일을 삭제 및 새로운 파일을 추가하는 예제입니다.
+
샘플 경로
+
Samples/Upload/ModifiedFileUpload
+

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
제목
게시판 선택 + 일반 게시판 + 동영상 게시판 +
관심 분야 + + + + + + + + + + + +
도서컴퓨터재테크
여행건강자동차
+
메모
+
+ + + + + +
+
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ModifiedFileUpload/UploadProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ModifiedFileUpload/UploadProcess.jsp new file mode 100644 index 00000000..abb89eab --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ModifiedFileUpload/UploadProcess.jsp @@ -0,0 +1,77 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="com.namo.crossuploader.*"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONObject"%> + +<% + PrintWriter writer = response.getWriter(); + FileUpload fileUpload = new FileUpload(request, response); + + try { + // autoMakeDirs를 true로 설정하면 파일 저장 및 이동시 파일생성에 필요한 상위 디렉토리를 모두 생성합니다. + fileUpload.setAutoMakeDirs(true); + + // 파일을 저장할 경로를 설정합니다. + String saveDirPath = request.getRealPath("/"); + saveDirPath += ("/UploadDir" + File.separator); + + // saveDirPath에 지정한 경로로 파일 업로드를 시작합니다. + fileUpload.startUpload(saveDirPath); + + // 업로드 경로를 지정하지 않을 경우, 시스템의 임시 디렉토리로 파일 업로드를 시작합니다. + // fileUpload.startUpload(); + + /** + * 입력한 file 태그의 name을 키로 갖는 FileItem[] 객체를 리턴합니다. + * NamoCrossUploader Client Flex Edition의 name은 "CU_FILE" 입니다. + */ + FileItem fileItem = fileUpload.getFileItem("CU_FILE"); + + if(fileItem != null) { + // saveDirPath 경로에 원본 파일명으로 저장(이동)합니다. 동일한 파일명이 존재할 경우 다른 이름으로 저장됩니다. + fileItem.save(saveDirPath); + + // 다른 유형의 저장(이동) 함수들 + /* + save(); + save(String saveDirPath, boolean overwrite); + saveAs(String saveDirPath, String fileName); + saveAs(String saveDirPath, String fileName, boolean overwrite); + */ + + // FileItem 객체로 아래와 같은 정보를 가져올 수 있습니다. 추가적으로 필요한 정보가 있을 경우 JSONObject 객체에 추가해 주십시오. + // 교환할 데이터는 JSON 타입이 아니어도 되며, Javascript에서 파싱할 적절한 형태로 조합하시면 됩니다. + // LastSavedDirectoryPath, LastSavedFileName에는 Windwos 경로에 대한 예외처리가 되어 있습니다. 서버 환경에 맞게 적절히 수정해 주십시오. + JSONObject jsonObject = new JSONObject(); + + jsonObject.put("name", fileItem.getName()); + jsonObject.put("fileName", fileItem.getFileName()); + jsonObject.put("lastSavedDirectoryPath", fileItem.getLastSavedDirPath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFilePath", fileItem.getLastSavedFilePath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFileName", fileItem.getLastSavedFileName()); + jsonObject.put("fileSize", Long.toString(fileItem.getFileSize())); + jsonObject.put("fileNameWithoutFileExt", fileItem.getFileNameWithoutFileExt()); + jsonObject.put("fileExtension", fileItem.getFileExtension()); + jsonObject.put("contentType", fileItem.getContentType()); + jsonObject.put("isSaved", Boolean.toString(fileItem.isSaved())); + jsonObject.put("isEmptyFile", Boolean.toString(fileItem.isEmptyFile())); + + StringWriter stringWriter = new StringWriter(); + jsonObject.writeJSONString(stringWriter); + writer.println(jsonObject.toString()); + } + } + catch(CrossUploaderException ex) { + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + catch(Exception ex) { + // 업로드 외 로직에서 예외 발생시 업로드 중인 모든 파일을 삭제합니다. + fileUpload.deleteUploadedFiles(); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + finally { + // 파일 업로드 객체에서 사용한 자원을 해제합니다. + fileUpload.clear(); + } +%> + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/MoveFileLocation/DataProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/MoveFileLocation/DataProcess.jsp new file mode 100644 index 00000000..9caa3020 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/MoveFileLocation/DataProcess.jsp @@ -0,0 +1,109 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 업로드 된 정보를 출력합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i + +<%! + public void printFileUploadResult(Object obj, PrintWriter writer) { + if(obj == null) + return; + + String html = ""; + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i"; + html += "Name" + (String)jsonObject.get("name") + ""; + html += "File Name" + (String)jsonObject.get("fileName") + ""; + html += "Last Saved Directory Path" + (String)jsonObject.get("lastSavedDirectoryPath") + ""; + html += "Last Saved File Path" + (String)jsonObject.get("lastSavedFilePath") + ""; + html += "Last Saved File Name" + (String)jsonObject.get("lastSavedFileName") + ""; + html += "File Size" + (String)jsonObject.get("fileSize") + ""; + html += "File Name without File Ext" + (String)jsonObject.get("fileNameWithoutFileExt") + ""; + html += "File Extension" + (String)jsonObject.get("fileExtension") + ""; + html += "Content Type" + (String)jsonObject.get("contentType") + ""; + html += "Is Saved" + (String)jsonObject.get("isSaved") + ""; + html += "Is EmptyFile" + (String)jsonObject.get("isEmptyFile") + ""; + html += ""; + } + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/MoveFileLocation/ErrorProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/MoveFileLocation/ErrorProcess.jsp new file mode 100644 index 00000000..b0b81c7a --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/MoveFileLocation/ErrorProcess.jsp @@ -0,0 +1,103 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 기존에 업로드 된 정보를 삭제합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + String osName = System.getProperty("os.name"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i + +<%! + public void printDeletedFilesInfo(String delFile, PrintWriter writer) { + if(delFile == null) + return; + + String html = ""; + html += "
"; + html += ""; + html += ""; + html += "
삭제된 파일 정보
Deleted File" + delFile + "
"; + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/MoveFileLocation/UploadForm.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/MoveFileLocation/UploadForm.html new file mode 100644 index 00000000..ff5ae709 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/MoveFileLocation/UploadForm.html @@ -0,0 +1,213 @@ + + + + + 파일 리스트 정렬 및 위치 이동 예제입니다. + + + + + + + + + + + + + + + + + + + + + + + + + +
+
샘플 설명
+
파일 리스트 정렬 및 위치 이동 예제입니다.
+
샘플 경로
+
Samples/Upload/MoveFileLocation
+

+ +
+
+ + +
+ + + +
+
+ + + + +
+
+ + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/MoveFileLocation/UploadProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/MoveFileLocation/UploadProcess.jsp new file mode 100644 index 00000000..6c4c6fca --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/MoveFileLocation/UploadProcess.jsp @@ -0,0 +1,77 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="com.namo.crossuploader.*"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONObject"%> + +<% + PrintWriter writer = response.getWriter(); + FileUpload fileUpload = new FileUpload(request, response); + + try { + // autoMakeDirs를 true로 설정하면 파일 저장 및 이동시 파일생성에 필요한 상위 디렉토리를 모두 생성합니다. + fileUpload.setAutoMakeDirs(true); + + // 파일을 저장할 경로를 설정합니다. + String saveDirPath = request.getRealPath("/"); + saveDirPath += ("UploadDir" + File.separator); + + // saveDirPath에 지정한 경로로 파일 업로드를 시작합니다. + fileUpload.startUpload(saveDirPath); + + // 업로드 경로를 지정하지 않을 경우, 시스템의 임시 디렉토리로 파일 업로드를 시작합니다. + // fileUpload.startUpload(); + + /** + * 입력한 file 태그의 name을 키로 갖는 FileItem[] 객체를 리턴합니다. + * NamoCrossUploader Client Flex Edition의 name은 "CU_FILE" 입니다. + */ + FileItem fileItem = fileUpload.getFileItem("CU_FILE"); + + if(fileItem != null) { + // saveDirPath 경로에 원본 파일명으로 저장(이동)합니다. 동일한 파일명이 존재할 경우 다른 이름으로 저장됩니다. + fileItem.save(saveDirPath); + + // 다른 유형의 저장(이동) 함수들 + /* + save(); + save(String saveDirPath, boolean overwrite); + saveAs(String saveDirPath, String fileName); + saveAs(String saveDirPath, String fileName, boolean overwrite); + */ + + // FileItem 객체로 아래와 같은 정보를 가져올 수 있습니다. 추가적으로 필요한 정보가 있을 경우 JSONObject 객체에 추가해 주십시오. + // 교환할 데이터는 JSON 타입이 아니어도 되며, Javascript에서 파싱할 적절한 형태로 조합하시면 됩니다. + // LastSavedDirectoryPath, LastSavedFileName에는 Windwos 경로에 대한 예외처리가 되어 있습니다. 서버 환경에 맞게 적절히 수정해 주십시오. + JSONObject jsonObject = new JSONObject(); + + jsonObject.put("name", fileItem.getName()); + jsonObject.put("fileName", fileItem.getFileName()); + jsonObject.put("lastSavedDirectoryPath", fileItem.getLastSavedDirPath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFilePath", fileItem.getLastSavedFilePath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFileName", fileItem.getLastSavedFileName()); + jsonObject.put("fileSize", Long.toString(fileItem.getFileSize())); + jsonObject.put("fileNameWithoutFileExt", fileItem.getFileNameWithoutFileExt()); + jsonObject.put("fileExtension", fileItem.getFileExtension()); + jsonObject.put("contentType", fileItem.getContentType()); + jsonObject.put("isSaved", Boolean.toString(fileItem.isSaved())); + jsonObject.put("isEmptyFile", Boolean.toString(fileItem.isEmptyFile())); + + StringWriter stringWriter = new StringWriter(); + jsonObject.writeJSONString(stringWriter); + writer.println(jsonObject.toString()); + } + } + catch(CrossUploaderException ex) { + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + catch(Exception ex) { + // 업로드 외 로직에서 예외 발생시 업로드 중인 모든 파일을 삭제합니다. + fileUpload.deleteUploadedFiles(); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + finally { + // 파일 업로드 객체에서 사용한 자원을 해제합니다. + fileUpload.clear(); + } +%> + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFileUpload/ConfigProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFileUpload/ConfigProcess.jsp new file mode 100644 index 00000000..d29d3e5e --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFileUpload/ConfigProcess.jsp @@ -0,0 +1,35 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="com.namo.crossuploader.*"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONObject"%> + +<% + PrintWriter writer = response.getWriter(); + FileUpload fileUpload = new FileUpload(request, response); + + try + { + // 파일을 저장할 경로를 설정합니다. + String saveDirPath = request.getRealPath("/"); + saveDirPath += ("UploadDir" + File.separator); + + // saveDirPath에 지정한 경로에서 이전에 올린 파일 정보를 체크 합니다. + fileUpload.startConfig(saveDirPath); + } + catch(CrossUploaderException ex) + { + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + catch(Exception ex) + { + // 업로드 외 로직에서 예외 발생시 업로드 중인 모든 파일을 삭제합니다. + fileUpload.deleteUploadedFiles(); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + finally + { + // 파일 업로드 객체에서 사용한 자원을 해제합니다. + fileUpload.clear(); + } +%> + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFileUpload/DataProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFileUpload/DataProcess.jsp new file mode 100644 index 00000000..9caa3020 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFileUpload/DataProcess.jsp @@ -0,0 +1,109 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 업로드 된 정보를 출력합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i + +<%! + public void printFileUploadResult(Object obj, PrintWriter writer) { + if(obj == null) + return; + + String html = ""; + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i"; + html += "Name" + (String)jsonObject.get("name") + ""; + html += "File Name" + (String)jsonObject.get("fileName") + ""; + html += "Last Saved Directory Path" + (String)jsonObject.get("lastSavedDirectoryPath") + ""; + html += "Last Saved File Path" + (String)jsonObject.get("lastSavedFilePath") + ""; + html += "Last Saved File Name" + (String)jsonObject.get("lastSavedFileName") + ""; + html += "File Size" + (String)jsonObject.get("fileSize") + ""; + html += "File Name without File Ext" + (String)jsonObject.get("fileNameWithoutFileExt") + ""; + html += "File Extension" + (String)jsonObject.get("fileExtension") + ""; + html += "Content Type" + (String)jsonObject.get("contentType") + ""; + html += "Is Saved" + (String)jsonObject.get("isSaved") + ""; + html += "Is EmptyFile" + (String)jsonObject.get("isEmptyFile") + ""; + html += ""; + } + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFileUpload/ErrorProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFileUpload/ErrorProcess.jsp new file mode 100644 index 00000000..b0b81c7a --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFileUpload/ErrorProcess.jsp @@ -0,0 +1,103 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 기존에 업로드 된 정보를 삭제합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + String osName = System.getProperty("os.name"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i + +<%! + public void printDeletedFilesInfo(String delFile, PrintWriter writer) { + if(delFile == null) + return; + + String html = ""; + html += "
"; + html += ""; + html += ""; + html += "
삭제된 파일 정보
Deleted File" + delFile + "
"; + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFileUpload/UploadForm.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFileUpload/UploadForm.html new file mode 100644 index 00000000..266e8016 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFileUpload/UploadForm.html @@ -0,0 +1,207 @@ + + + + + 이어올리기 예제입니다. 기본적으로 대용량 파일 업로드 모드에서 동작합니다. + + + + + + + + + + + + + + + + + + + + + + + + + +
+
샘플 설명
+
이어올리기 예제입니다. 기본적으로 대용량 파일 업로드 모드에서 동작합니다.
+
샘플 경로
+
Samples/Upload/ResumeFileUpload
+

+ +
+
+ + +
+ + +
+ + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFileUpload/UploadProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFileUpload/UploadProcess.jsp new file mode 100644 index 00000000..8a8f54bf --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFileUpload/UploadProcess.jsp @@ -0,0 +1,81 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="com.namo.crossuploader.*"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONObject"%> + +<% + PrintWriter writer = response.getWriter(); + FileUpload fileUpload = new FileUpload(request, response); + + try + { + // autoMakeDirs를 true로 설정하면 파일 저장 및 이동시 파일생성에 필요한 상위 디렉토리를 모두 생성합니다. + fileUpload.setAutoMakeDirs(true); + + // 파일을 저장할 경로를 설정합니다. + String saveDirPath = request.getRealPath("/"); + saveDirPath += ("UploadDir" + File.separator); + + // saveDirPath에 지정한 경로로 파일 업로드를 시작합니다. + fileUpload.startLargeUpload(saveDirPath); + + // 업로드 경로를 지정하지 않을 경우, 시스템의 임시 디렉토리로 파일 업로드를 시작합니다. + // fileUpload.startLargeUpload(); + + if (fileUpload.getLargeUploadStatus() == "COMPLETION") + { + FileItem fileItem = fileUpload.getFileItem("CU_FILE"); + + if(fileItem != null) { + // saveDirPath 경로에 원본 파일명으로 저장(이동)합니다. 동일한 파일명이 존재할 경우 다른 이름으로 저장됩니다. + fileItem.save(saveDirPath); + + // 다른 유형의 저장(이동) 함수들 + /* + save(); + save(String saveDirPath, boolean overwrite); + saveAs(String saveDirPath, String fileName); + saveAs(String saveDirPath, String fileName, boolean overwrite); + */ + + // FileItem 객체로 아래와 같은 정보를 가져올 수 있습니다. 추가적으로 필요한 정보가 있을 경우 JSONObject 객체에 추가해 주십시오. + // 교환할 데이터는 JSON 타입이 아니어도 되며, Javascript에서 파싱할 적절한 형태로 조합하시면 됩니다. + // LastSavedDirectoryPath, LastSavedFileName에는 Windwos 경로에 대한 예외처리가 되어 있습니다. 서버 환경에 맞게 적절히 수정해 주십시오. + JSONObject jsonObject = new JSONObject(); + + jsonObject.put("largeUploadStatus", fileUpload.getLargeUploadStatus()); // "largeUploadStatus"는 내부적으로 사용되는 이름입니다. 그대도 유지해 주십시오. + jsonObject.put("name", fileItem.getName()); + jsonObject.put("fileName", fileItem.getFileName()); + jsonObject.put("lastSavedDirectoryPath", fileItem.getLastSavedDirPath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFilePath", fileItem.getLastSavedFilePath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFileName", fileItem.getLastSavedFileName()); + jsonObject.put("fileSize", Long.toString(fileItem.getFileSize())); + jsonObject.put("fileNameWithoutFileExt", fileItem.getFileNameWithoutFileExt()); + jsonObject.put("fileExtension", fileItem.getFileExtension()); + jsonObject.put("contentType", fileItem.getContentType()); + jsonObject.put("isSaved", Boolean.toString(fileItem.isSaved())); + jsonObject.put("isEmptyFile", Boolean.toString(fileItem.isEmptyFile())); + + StringWriter stringWriter = new StringWriter(); + jsonObject.writeJSONString(stringWriter); + writer.println(jsonObject.toString()); + } + } + } + catch(CrossUploaderException ex) + { + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + catch(Exception ex) + { + // 업로드 외 로직에서 예외 발생시 업로드 중인 모든 파일을 삭제합니다. + fileUpload.deleteUploadedFiles(); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + finally + { + // 파일 업로드 객체에서 사용한 자원을 해제합니다. + fileUpload.clear(); + } +%> + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFolderUpload/ConfigProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFolderUpload/ConfigProcess.jsp new file mode 100644 index 00000000..d29d3e5e --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFolderUpload/ConfigProcess.jsp @@ -0,0 +1,35 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="com.namo.crossuploader.*"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONObject"%> + +<% + PrintWriter writer = response.getWriter(); + FileUpload fileUpload = new FileUpload(request, response); + + try + { + // 파일을 저장할 경로를 설정합니다. + String saveDirPath = request.getRealPath("/"); + saveDirPath += ("UploadDir" + File.separator); + + // saveDirPath에 지정한 경로에서 이전에 올린 파일 정보를 체크 합니다. + fileUpload.startConfig(saveDirPath); + } + catch(CrossUploaderException ex) + { + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + catch(Exception ex) + { + // 업로드 외 로직에서 예외 발생시 업로드 중인 모든 파일을 삭제합니다. + fileUpload.deleteUploadedFiles(); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + finally + { + // 파일 업로드 객체에서 사용한 자원을 해제합니다. + fileUpload.clear(); + } +%> + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFolderUpload/DataProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFolderUpload/DataProcess.jsp new file mode 100644 index 00000000..4d5fb8a9 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFolderUpload/DataProcess.jsp @@ -0,0 +1,111 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 업로드 된 정보를 출력합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i + +<%! + public void printFileUploadResult(Object obj, PrintWriter writer) { + if(obj == null) + return; + + String html = ""; + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i"; + html += "Name" + (String)jsonObject.get("name") + ""; + html += "File Name" + (String)jsonObject.get("fileName") + ""; + html += "Source File Directory Path" + (String)jsonObject.get("sourceFileDirectoryPath") + ""; + html += "Last Saved Directory Path" + (String)jsonObject.get("lastSavedDirectoryPath") + ""; + html += "Last Saved File Path" + (String)jsonObject.get("lastSavedFilePath") + ""; + html += "Last Saved File Name" + (String)jsonObject.get("lastSavedFileName") + ""; + html += "File Size" + (String)jsonObject.get("fileSize") + ""; + html += "File Name without File Ext" + (String)jsonObject.get("fileNameWithoutFileExt") + ""; + html += "File Extension" + (String)jsonObject.get("fileExtension") + ""; + html += "Content Type" + (String)jsonObject.get("contentType") + ""; + html += "Is Saved" + (String)jsonObject.get("isSaved") + ""; + html += "Is EmptyFile" + (String)jsonObject.get("isEmptyFile") + ""; + html += ""; + } + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFolderUpload/ErrorProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFolderUpload/ErrorProcess.jsp new file mode 100644 index 00000000..b0b81c7a --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFolderUpload/ErrorProcess.jsp @@ -0,0 +1,103 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 기존에 업로드 된 정보를 삭제합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + String osName = System.getProperty("os.name"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i + +<%! + public void printDeletedFilesInfo(String delFile, PrintWriter writer) { + if(delFile == null) + return; + + String html = ""; + html += "
"; + html += ""; + html += ""; + html += "
삭제된 파일 정보
Deleted File" + delFile + "
"; + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFolderUpload/UploadForm.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFolderUpload/UploadForm.html new file mode 100644 index 00000000..033097e8 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFolderUpload/UploadForm.html @@ -0,0 +1,365 @@ + + + + + 폴더 이어올리기 예제입니다. + + + + + + + + + + + + + + + + + + + + + + + + + +
+
샘플 설명
+
이어올리기 모드에서 선택한 폴더를 폴더구조대로 업로드하는 예제입니다. 기본적으로 대용량 파일 업로드 모드에서 동작합니다
(대용량 파일 업로드 샘플도 동일한 방법으로 적용 가능합니다.)
+
샘플 경로
+
Samples/Upload/ResumeFolderUpload
+

+ + +
+ (아래 표에서 변경할 UI 스타일을 설정해 주십시오. 좀 더 다양한 스타일은 "파일 업로드 UI 설정" 샘플을 참고해 주십시오.)
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
항목초기 값변경할 값설명
상단(버튼) 패널 display 상태 변경block + block
+ none +
상단 패널 display 상태가 none일 경우, selectFiles, selectFolder, startUpload 메소드를 사용해 주십시오.
파일선택 버튼의 display 상태 변경block + block
+ none +
파일선택 버튼의 display 상태가 none일 경우, selectFiles 메소드를 사용해 주십시오.
기본값은 block이나, 업로드 객체 생성시 none으로 속성을 변경했습니다. 샘플 소스를 확인해 주십시오.
파일선택 버튼의 disabled 상태 변경false + true
+ false +
파일선택 버튼의 disabled 상태가 true일 경우, selectFiles 메소드를 사용해 주십시오.
폴더선택 버튼의 display 상태 변경none + block
+ none +
폴더선택 버튼의 display 상태가 none일 경우, selectFolder 메소드를 사용해 주십시오.
기본값은 none이나, 업로드 객체 생성시 block으로 속성을 변경했습니다. 샘플 소스를 확인해 주십시오.
폴더선택 버튼의 disabled 상태 변경false + true
+ false +
Folder선택 버튼의 disabled 상태가 true일 경우, selectFolder 메소드를 사용해 주십시오.
업로드 버튼의 display 상태 변경block + block
+ none +
업로드 버튼의 display 상태가 none일 경우, startUpload 메소드를 사용해 주십시오.
업로드 버튼의 disabled 상태 변경false + true
+ false +
업로드 버튼의 disabled 상태가 true일 경우, startUpload 메소드를 사용해 주십시오.
+
+
+ +
+
+ + +
+ + + +
+
+ + + +
+
+
+ +
+ + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFolderUpload/UploadProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFolderUpload/UploadProcess.jsp new file mode 100644 index 00000000..3078d222 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/ResumeFolderUpload/UploadProcess.jsp @@ -0,0 +1,87 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="com.namo.crossuploader.*"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONObject"%> + +<% + PrintWriter writer = response.getWriter(); + FileUpload fileUpload = new FileUpload(request, response); + + try + { + // autoMakeDirs를 true로 설정하면 파일 저장 및 이동시 파일생성에 필요한 상위 디렉토리를 모두 생성합니다. + fileUpload.setAutoMakeDirs(true); + + // 파일을 저장할 경로를 설정합니다. + String saveDirPath = request.getRealPath("/"); + saveDirPath += ("UploadDir" + File.separator); + + // saveDirPath에 지정한 경로로 파일 업로드를 시작합니다. + fileUpload.startLargeUpload(saveDirPath); + + // 업로드 경로를 지정하지 않을 경우, 시스템의 임시 디렉토리로 파일 업로드를 시작합니다. + // fileUpload.startLargeUpload(); + + if (fileUpload.getLargeUploadStatus() == "COMPLETION") + { + FileItem fileItem = fileUpload.getFileItem("CU_FILE"); + + if(fileItem != null) { + // saveDirPath 경로에 폴더를 생성하고 원본 파일명으로 저장(이동)합니다. 동일한 파일명이 존재할 경우 다른 이름으로 저장됩니다. + // 다른 경로에 폴더 구조로 업로드 하기 위해서는 아래와 같이 수정해 주십시오. + /* + string sourceFileDirectoryPath = fileItem.getSourceFileDirectoryPath(); + fileItem.save(saveDirPath + sourceFileDirectoryPath); + */ + fileItem.save(); + + // 다른 유형의 저장(이동) 함수들 + /* + save(String saveDirPath); + save(String saveDirPath, bool overwrite); + saveAs(String saveDirPath, String fileName); + saveAs(String saveDirPath, String fileName, bool overwrite); + */ + + // FileItem 객체로 아래와 같은 정보를 가져올 수 있습니다. 추가적으로 필요한 정보가 있을 경우 JSONObject 객체에 추가해 주십시오. + // 교환할 데이터는 JSON 타입이 아니어도 되며, Javascript에서 파싱할 적절한 형태로 조합하시면 됩니다. + // LastSavedDirectoryPath, LastSavedFileName에는 Windwos 경로에 대한 예외처리가 되어 있습니다. 서버 환경에 맞게 적절히 수정해 주십시오. + JSONObject jsonObject = new JSONObject(); + + jsonObject.put("largeUploadStatus", fileUpload.getLargeUploadStatus()); + jsonObject.put("name", fileItem.getName()); + jsonObject.put("fileName", fileItem.getFileName()); + jsonObject.put("sourceFileDirectoryPath", fileItem.getSourceFileDirectoryPath()); + jsonObject.put("lastSavedDirectoryPath", fileItem.getLastSavedDirPath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFilePath", fileItem.getLastSavedFilePath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFileName", fileItem.getLastSavedFileName()); + jsonObject.put("fileSize", Long.toString(fileItem.getFileSize())); + jsonObject.put("fileNameWithoutFileExt", fileItem.getFileNameWithoutFileExt()); + jsonObject.put("fileExtension", fileItem.getFileExtension()); + jsonObject.put("contentType", fileItem.getContentType()); + jsonObject.put("isSaved", Boolean.toString(fileItem.isSaved())); + jsonObject.put("isEmptyFile", Boolean.toString(fileItem.isEmptyFile())); + + StringWriter stringWriter = new StringWriter(); + jsonObject.writeJSONString(stringWriter); + writer.println(jsonObject.toString()); + } + } + } + catch(CrossUploaderException ex) + { + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + catch(Exception ex) + { + // 업로드 외 로직에서 예외 발생시 업로드 중인 모든 파일을 삭제합니다. + fileUpload.deleteUploadedFiles(); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + finally + { + // 파일 업로드 객체에서 사용한 자원을 해제합니다. + fileUpload.clear(); + } +%> + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/VariousFormUpload/DataProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/VariousFormUpload/DataProcess.jsp new file mode 100644 index 00000000..dacb673a --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/VariousFormUpload/DataProcess.jsp @@ -0,0 +1,138 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 폼 데이터 정보를 처리합니다. + */ + String textTitle = request.getParameter("textTitle"); // 제목 + String radioCate = request.getParameter("radioCate"); // 게시판 선택 + String[] checkInter = request.getParameterValues("checkInter"); // 관심 분야 + String memoTextarea = request.getParameter("memoTextarea"); // 메모 + printFormUploadResult(textTitle, radioCate, checkInter, memoTextarea, writer); + + + /** + * 업로드 된 정보를 출력합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i + +<%! + public void printFileUploadResult(Object obj, PrintWriter writer) { + if(obj == null) + return; + + String html = ""; + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i"; + html += "Name" + (String)jsonObject.get("name") + ""; + html += "File Name" + (String)jsonObject.get("fileName") + ""; + html += "Last Saved Directory Path" + (String)jsonObject.get("lastSavedDirectoryPath") + ""; + html += "Last Saved File Path" + (String)jsonObject.get("lastSavedFilePath") + ""; + html += "Last Saved File Name" + (String)jsonObject.get("lastSavedFileName") + ""; + html += "File Size" + (String)jsonObject.get("fileSize") + ""; + html += "File Name without File Ext" + (String)jsonObject.get("fileNameWithoutFileExt") + ""; + html += "File Extension" + (String)jsonObject.get("fileExtension") + ""; + html += "Content Type" + (String)jsonObject.get("contentType") + ""; + html += "Is Saved" + (String)jsonObject.get("isSaved") + ""; + html += "Is EmptyFile" + (String)jsonObject.get("isEmptyFile") + ""; + html += ""; + } + writer.println(html); + } + + public void printFormUploadResult(String textTitle, String radioCate, String[] checkInter, String memoTextarea, PrintWriter writer) { + String html = "
"; + html += ""; + if(textTitle != null) + html += ""; + if(radioCate != null) + html += ""; + if(checkInter != null) { + for(int i=0; i"; + } + if(memoTextarea != null) + html += ""; + + html += "
폼 데이터 업로드 정보
제목" + textTitle + "
게시판 선택" + radioCate + "
" + checkInter[i] + "
메모" + memoTextarea + "
"; + + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/VariousFormUpload/ErrorProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/VariousFormUpload/ErrorProcess.jsp new file mode 100644 index 00000000..b0b81c7a --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/VariousFormUpload/ErrorProcess.jsp @@ -0,0 +1,103 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONArray"%> +<%@page import="org.json.simple.JSONObject"%> +<%@page import="org.json.simple.parser.JSONParser"%> +<%@page import="org.json.simple.parser.ParseException"%> + +<% + request.setCharacterEncoding("UTF-8"); + PrintWriter writer = response.getWriter(); + // 업로드 정보를 화면에 출력하기 위한 HTML 코드입니다. 신경쓰지 않으셔도 됩니다. + printHtmlHeader(writer); + + try { + /** + * 기존에 업로드 된 정보를 삭제합니다. + * 샘플에서는 JSON 타입으로 데이터를 교환하고 있습니다. 필요 시 다른 형식으로 조합해서 사용하실 수 있습니다. + */ + String uploadedFilesInfo = request.getParameter("uploadedFilesInfo"); + String osName = System.getProperty("os.name"); + if(uploadedFilesInfo != null) { + JSONParser jsonParser = new JSONParser(); + Object obj = jsonParser.parse(uploadedFilesInfo); + JSONArray jsonArray = (JSONArray)obj; + for(int i=0; i + +<%! + public void printDeletedFilesInfo(String delFile, PrintWriter writer) { + if(delFile == null) + return; + + String html = ""; + html += "
"; + html += ""; + html += ""; + html += "
삭제된 파일 정보
Deleted File" + delFile + "
"; + writer.println(html); + } + + public void printExceptionMessage(String message, PrintWriter writer) { + String html = "
"; + html += ""; + html += ""; + html += "
예외가 발생했습니다.
예외 메시지: " + message + "
"; + + writer.println(html); + } + + public void printHtmlHeader(PrintWriter writer) { + String html = ""; + html += ""; + html += ""; + html += "파일 업로드 정보입니다"; + html += ""; + + writer.println(html); + } + + public void printHtmlFooter(PrintWriter writer) { + writer.println(""); + writer.flush(); + } +%> \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/VariousFormUpload/UploadForm.html b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/VariousFormUpload/UploadForm.html new file mode 100644 index 00000000..2d19335f --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/VariousFormUpload/UploadForm.html @@ -0,0 +1,244 @@ + + + + + 파일 및 다양한 폼 데이터를 업로드하는 예제입니다 + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
샘플 설명
+
파일 및 다양한 폼 데이터를 업로드하는 예제입니다.
+
샘플 경로
+
Samples/Upload/VariousFormUpload
+

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
제목
게시판 선택 + 일반 게시판 + 동영상 게시판 +
관심 분야 + + + + + + + + + + + +
도서컴퓨터재테크
여행건강자동차
+
메모
+ + +
+
+
+
+ + + \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/VariousFormUpload/UploadProcess.jsp b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/VariousFormUpload/UploadProcess.jsp new file mode 100644 index 00000000..6c4c6fca --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/Upload/VariousFormUpload/UploadProcess.jsp @@ -0,0 +1,77 @@ +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="com.namo.crossuploader.*"%> +<%@page import="java.io.*"%> +<%@page import="org.json.simple.JSONObject"%> + +<% + PrintWriter writer = response.getWriter(); + FileUpload fileUpload = new FileUpload(request, response); + + try { + // autoMakeDirs를 true로 설정하면 파일 저장 및 이동시 파일생성에 필요한 상위 디렉토리를 모두 생성합니다. + fileUpload.setAutoMakeDirs(true); + + // 파일을 저장할 경로를 설정합니다. + String saveDirPath = request.getRealPath("/"); + saveDirPath += ("UploadDir" + File.separator); + + // saveDirPath에 지정한 경로로 파일 업로드를 시작합니다. + fileUpload.startUpload(saveDirPath); + + // 업로드 경로를 지정하지 않을 경우, 시스템의 임시 디렉토리로 파일 업로드를 시작합니다. + // fileUpload.startUpload(); + + /** + * 입력한 file 태그의 name을 키로 갖는 FileItem[] 객체를 리턴합니다. + * NamoCrossUploader Client Flex Edition의 name은 "CU_FILE" 입니다. + */ + FileItem fileItem = fileUpload.getFileItem("CU_FILE"); + + if(fileItem != null) { + // saveDirPath 경로에 원본 파일명으로 저장(이동)합니다. 동일한 파일명이 존재할 경우 다른 이름으로 저장됩니다. + fileItem.save(saveDirPath); + + // 다른 유형의 저장(이동) 함수들 + /* + save(); + save(String saveDirPath, boolean overwrite); + saveAs(String saveDirPath, String fileName); + saveAs(String saveDirPath, String fileName, boolean overwrite); + */ + + // FileItem 객체로 아래와 같은 정보를 가져올 수 있습니다. 추가적으로 필요한 정보가 있을 경우 JSONObject 객체에 추가해 주십시오. + // 교환할 데이터는 JSON 타입이 아니어도 되며, Javascript에서 파싱할 적절한 형태로 조합하시면 됩니다. + // LastSavedDirectoryPath, LastSavedFileName에는 Windwos 경로에 대한 예외처리가 되어 있습니다. 서버 환경에 맞게 적절히 수정해 주십시오. + JSONObject jsonObject = new JSONObject(); + + jsonObject.put("name", fileItem.getName()); + jsonObject.put("fileName", fileItem.getFileName()); + jsonObject.put("lastSavedDirectoryPath", fileItem.getLastSavedDirPath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFilePath", fileItem.getLastSavedFilePath().replaceAll("\\\\", "/")); + jsonObject.put("lastSavedFileName", fileItem.getLastSavedFileName()); + jsonObject.put("fileSize", Long.toString(fileItem.getFileSize())); + jsonObject.put("fileNameWithoutFileExt", fileItem.getFileNameWithoutFileExt()); + jsonObject.put("fileExtension", fileItem.getFileExtension()); + jsonObject.put("contentType", fileItem.getContentType()); + jsonObject.put("isSaved", Boolean.toString(fileItem.isSaved())); + jsonObject.put("isEmptyFile", Boolean.toString(fileItem.isEmptyFile())); + + StringWriter stringWriter = new StringWriter(); + jsonObject.writeJSONString(stringWriter); + writer.println(jsonObject.toString()); + } + } + catch(CrossUploaderException ex) { + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + catch(Exception ex) { + // 업로드 외 로직에서 예외 발생시 업로드 중인 모든 파일을 삭제합니다. + fileUpload.deleteUploadedFiles(); + response.setStatus(response.SC_INTERNAL_SERVER_ERROR); + } + finally { + // 파일 업로드 객체에서 사용한 자원을 해제합니다. + fileUpload.clear(); + } +%> + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/css/namocrossuploader.css b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/css/namocrossuploader.css new file mode 100644 index 00000000..e9556ff6 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/css/namocrossuploader.css @@ -0,0 +1,123 @@ +/* + * NamoCrossUploader css file. + * Copyright NAMO Interactive Inc. + */ + +/** +* NamoCrossUploader Monitor â ׶ ŸԴϴ. +*/ +.monitorBgLayer { + position:absolute; + left: 0px;top: 0px; + width: 100%; + height: 100%; + background-color: black; + opacity:0.30; /* firefox, opera, safari, chrome */ + -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=30)"; /* IE 8 */ + filter:alpha(opacity=30); /* IE 4, 5, 6 and 7 */ + z-index: 101; +} + +/** +* NamoCrossUploader Monitor â ŸԴϴ. +*/ +.monitorLayer { + position:absolute; + top: 25%;left:30%; + width: 610px;height: 358px; + margin-top: 0px;margin-left: 0px; + background-color: white; + z-index: 102; +} + +/** +* NamoCrossUploader ̾ ø ɼ â ׶ ŸԴϴ. +*/ +.resumeOptionBgLayer { + position:absolute; + left: 0px;top: 0px; + width: 100%; + height: 100%; + background-color: black; + opacity:0.30; /* firefox, opera, safari, chrome */ + -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=30)"; /* IE 8 */ + filter:alpha(opacity=30); /* IE 4, 5, 6 and 7 */ + z-index: 103; +} + +/** +* NamoCrossUploader ̾ ø ɼ â ŸԴϴ. +*/ +.resumeOptionLayer { + position: absolute; + top: 30%; + left: 35%; + width: 470px; + height: 272px; + margin-top: 0px; + margin-left: 0px; + background-color: white; + z-index: 104; +} + +/** +NamoCrossUploader Image Preview ŸԴϴ. +*/ +.imagePreviewBgLayer { + display: none; + position: absolute; + left: 0px; + top: 0px; + width: 100%; + height: 100%; + background-color: black; + opacity: 0.30; /* firefox, opera, safari, chrome */ + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(opacity=30)"; /* IE 8 */ + filter: alpha(opacity=30); /* IE 4, 5, 6 and 7 */ + z-index: 101; +} + +.imagePreviewLayer { + display: none; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + text-align: center; + z-index: 102; +} + +.imagePreviewLayer img { + display: inline-block; + background-color: black; + vertical-align: middle; + cursor: pointer; +} + +.imagePreviewLayer span { + display: inline-block; + width: 0; + height: 100%; + vertical-align: middle; +} + + +/** +* SlickGrid ŸԴϴ. +*/ +.slick-viewport .slick-cell { + border: none; +} +.slick-header-column { + text-align: center; +} +.slick-viewport .slick-grid-filesize { + text-align:right; +} +.slick-viewport .slick-grid-transfer-status { + text-align:center; +} +.slick-viewport .slick-grid-download-button { + text-align:center; +} diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/ai.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/ai.png new file mode 100644 index 00000000..0e028527 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/ai.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/avi.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/avi.png new file mode 100644 index 00000000..0029c80b Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/avi.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/bmp.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/bmp.png new file mode 100644 index 00000000..da267e78 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/bmp.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/css.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/css.png new file mode 100644 index 00000000..e584f18f Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/css.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/doc.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/doc.png new file mode 100644 index 00000000..66a0f204 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/doc.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/docx.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/docx.png new file mode 100644 index 00000000..66a0f204 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/docx.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/eml.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/eml.png new file mode 100644 index 00000000..c1e2cfb1 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/eml.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/etc.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/etc.png new file mode 100644 index 00000000..9f1fb41e Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/etc.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/exe.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/exe.png new file mode 100644 index 00000000..009e9a57 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/exe.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/fla.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/fla.png new file mode 100644 index 00000000..10df5510 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/fla.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/flv.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/flv.png new file mode 100644 index 00000000..75cc9856 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/flv.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/folder.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/folder.png new file mode 100644 index 00000000..b8146162 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/folder.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/gif.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/gif.png new file mode 100644 index 00000000..351e00f9 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/gif.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/gul.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/gul.png new file mode 100644 index 00000000..b94d5acf Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/gul.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/html.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/html.png new file mode 100644 index 00000000..16d7bd63 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/html.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/hwp.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/hwp.png new file mode 100644 index 00000000..6191a4da Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/hwp.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/jpg.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/jpg.png new file mode 100644 index 00000000..124ae257 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/jpg.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/mp3.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/mp3.png new file mode 100644 index 00000000..72e0a6ce Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/mp3.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/mp4.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/mp4.png new file mode 100644 index 00000000..8700e40b Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/mp4.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/mpg.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/mpg.png new file mode 100644 index 00000000..0029c80b Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/mpg.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/msg.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/msg.png new file mode 100644 index 00000000..c1e2cfb1 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/msg.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/pdf.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/pdf.png new file mode 100644 index 00000000..ef818986 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/pdf.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/png.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/png.png new file mode 100644 index 00000000..b62dd07f Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/png.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/ppt.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/ppt.png new file mode 100644 index 00000000..eac1b1cc Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/ppt.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/psd.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/psd.png new file mode 100644 index 00000000..96f6cfa5 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/psd.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/swf.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/swf.png new file mode 100644 index 00000000..371f0484 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/swf.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/tif.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/tif.png new file mode 100644 index 00000000..dbe07c2b Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/tif.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/txt.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/txt.png new file mode 100644 index 00000000..8cc4dacc Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/txt.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/wmv.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/wmv.png new file mode 100644 index 00000000..0029c80b Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/wmv.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/xls.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/xls.png new file mode 100644 index 00000000..1fbbaf8d Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/xls.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/xlsx.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/xlsx.png new file mode 100644 index 00000000..1fbbaf8d Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/xlsx.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/zip.png b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/zip.png new file mode 100644 index 00000000..b9307785 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/image/file_icon/zip.png differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/js/namocrossuploader-config.js b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/js/namocrossuploader-config.js new file mode 100644 index 00000000..4f09ba4b --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/js/namocrossuploader-config.js @@ -0,0 +1,33 @@ +/* + * NamoCrossUploader configuration file. + * Copyright NAMO Interactive Inc. + */ +;; (function (win) { + + if (!location.origin) + location.origin = location.protocol + "//" + location.host; + + var namoCrossUploaderEvents = new Object(); + namoCrossUploaderEvents.onStartUpload = "onStartUploadCu"; // 업로드 시작 시 호출됩니다. + namoCrossUploaderEvents.onStartUploadItem = "onStartUploadItemCu"; // 개별 파일에 대한 업로드 시작 시 호출됩니다. + namoCrossUploaderEvents.onEndUploadItem = "onEndUploadItemCu"; // 개별 파일에 대한 업로드 완료 시 호출됩니다. + namoCrossUploaderEvents.onEndUpload = "onEndUploadCu"; // 업로드 완료 시 호출됩니다. + namoCrossUploaderEvents.onCloseMonitorWindow = "onCloseMonitorWindowCu"; // 전송창이 닫힐 때 호출됩니다. + namoCrossUploaderEvents.onCancelUploadItem = "onCancelUploadItemCu"; // 개별 파일에 대한 업로드 취소 시 호출됩니다. + namoCrossUploaderEvents.onException = "onExceptionCu"; // 예외 발생 시 호출됩니다 + namoCrossUploaderEvents.onDblClickGridRow = "onDblClickGridRowCu"; // 그리드 행 더블클릭 시 호출됩니다. + + win.namoCrossUploaderConfig = { + + // 제품버전 + version: "2.3.0", + + // 제품경로 + productPath: location.origin + "/NamoCrossUploaderH5Samples/Samples/", + + // Event 이름 설정 + eventNames: namoCrossUploaderEvents + + }; + +})(window); \ No newline at end of file diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/js/namocrossuploader.js b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/js/namocrossuploader.js new file mode 100644 index 00000000..553a6f06 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/js/namocrossuploader.js @@ -0,0 +1,4267 @@ +/* + * NamoCrossUploader program file. + * Copyright NAMO Interactive Inc. + */ +var __NamoCrossUploaderUtils = function () +{ + this.s4 = function () + { + return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); + }; + + this.getGuid = function () + { + var guid = (this.s4() + this.s4() + "-" + this.s4() + "-4" + this.s4().substr(0, 3) + "-" + this.s4() + "-" + this.s4() + this.s4() + this.s4()).toLowerCase(); + return guid; + }; + + this.stringFormat = function () + { + var expression = arguments[0]; + for (var i = 1; i < arguments.length; i++) { + var pattern = "{" + (i - 1) + "}"; + expression = expression.replace(pattern, arguments[i]); + } + return expression; + }; + + this.convertByteUnit = function (number) + { + var unitLevel = 0; + var unit = ""; + var resultString = ""; + + if (number / 1000.0 / 1000.0 / 1000.0 > 1) { + unit = "GB"; + unitLevel = 3; + } + else if (number / 1000.0 / 1000.0 > 1) { + unit = "MB"; + unitLevel = 2; + } + else if (number / 1000.0 > 1) { + unit = "KB"; + unitLevel = 1; + } + else { + //unit = "Bytes"; + unit = "B"; + unitLevel = 0; + } + resultString = this.convertByteUnitWithLevel(number, unitLevel); + resultString += unit; + return resultString; + }; + + this.convertByteUnitWithLevel = function (number, unitLevel) + { + var resultString = ""; + var calculatedNumber = 0; + + if (unitLevel == 3) + calculatedNumber = number / 1024.0 / 1024.0 / 1024.0; + else if (unitLevel == 2) + calculatedNumber = number / 1024.0 / 1024.0; + else if (unitLevel == 1) + calculatedNumber = number / 1024.0; + else + calculatedNumber = Number(number); + + resultString = this.numberFormat(calculatedNumber); + return resultString; + }; + + this.numberFormat = function (number, precision) + { + if (precision == undefined) + precision = 2; + + number = number.toFixed(precision); + var parts = number.toString().split("."); + parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","); + return parts.join("."); + }; + + + this.getJsonString = function (keys, values) + { + if (keys == undefined || keys.length == 0) + return '{}'; + + var json = ''; + for (var i = 0; i < keys.length; i++) { + json += ('"' + keys[i].toString() + '":'); + json += ('"' + values[i].toString() + '",'); + } + if (json.length > 0) + json = '{' + json.substring(0, json.length - 1) + '}'; + + return json; + }; + + this.getPxFromPercent = function (parentId, wh) + { + if (parentId == undefined || parentId.length == 0) + return 0; + + var pxSize = wh == "WIDTH" ? $("#" + parentId).width() : $("#" + parentId).height(); + if (pxSize == null) + return 0; + else + return pxSize; + }; + + this.getDigitString = function (data) + { + if (data == undefined || data.trim() == "") + return ""; + + var minus = ""; + if (data.trim().substring(0, 1) == "-") + minus = "-"; + + var regExp = /[^0-9]/g; + return (minus + data.replace(regExp, "")); + } + this.getFileExtension = function(fileName) + { + var pos = fileName.lastIndexOf("."); + if (pos != -1) + return fileName.substring(pos + 1).toLowerCase(); + else + return ""; + } +}; + +var __UploadFileInfo = function () +{ + this.id = ''; + this.fileType = 'NORMAL'; // NORMAL, UPLOADED, FOLDER + this.folderId = ''; // 폴더 추가시 파일 리스트를 관리하는 폴더 아이디 + this.fileId = ''; // 게시판 수정모드를 위한 사용 + this.file; + this.fileDirPath = ''; + this.fileName = ''; + this.fileSize = 0; + this.status = 'WAIT'; // WAIT, COMPLETION, CANCELLATION + this.isDeleted = false; + this.transferedSize = 0; + this.xmlHttpRequest = null; + + // resume + this.fileGroupId = ''; + this.fileNameKey = ''; + this.tempFileSize = 0; + this.tempFileUpdatedDate; + this.isExistedFile = false; +}; + +var __DownloadFileInfo = function () +{ + this.id = ''; + this.fileId = ''; + this.fileName = ''; + this.fileSize = 0; + this.fileUrl = ''; +}; + +var __Global = function () +{ + + + // Max file size + this.MAX_FILE_SIZE = 2147483647; // (1024*1024*1024*2)-1 + + // 일반적 예외 코드 정의 + this.ALLOWED_EXTENSION_ERROR = "300101"; + this.MAX_FILE_COUNT_ERROR = "300102"; + this.MAX_FILE_SIZE_ERROR = "300103"; + this.MAX_TOTAL_FILE_SIZE_ERROR = "300104"; + //this.EMPTY_FILES_TO_TRANSFER_ERROR = "300105"; + + // 서버측 예외 코드 정의 + this.HTTP_STATUS_ERROR = "500501"; +} + + +var __FileUploadManager = function (_parent) +{ + var self = this; + var parent = _parent; + this.utils = new __NamoCrossUploaderUtils(); + this.global = new __Global(); + this.containerId = ""; + + this.mainPanel = this.utils.getGuid(); + + this.buttonPanel = this.utils.getGuid(); + this.addFilesButton = this.utils.getGuid(); + this.addFolderButton = this.utils.getGuid(); + this.fileButton = this.utils.getGuid(); + this.folderButton = this.utils.getGuid(); + this.uploadButton = this.utils.getGuid(); + + this.topSplitLine = this.utils.getGuid(); + + this.managerDataGrid = this.utils.getGuid(); + + this.statusPanel = this.utils.getGuid(); + this.deleteFileButton = this.utils.getGuid(); + this.addFilesButtonOnStatus = this.utils.getGuid(); + this.statusLabel = this.utils.getGuid(); + + this.imagePreviewBgPanel = this.utils.getGuid(); + this.imagePreviewPanel = this.utils.getGuid(); + this.previewImage = this.utils.getGuid(); + this.imagePreviewLayerClass = ""; + this.imagePreviewBgLayerClass = ""; + + + this.width = 0; + this.height = 0; + this.buttonPanelHeight = 40; + this.buttonWidth = 92; + this.buttonHeight = 30; + this.topSplitLineHeight = 1; + this.statusPanelHeight = 28; + this.statusHeight = 20; + this.deleteFileButtonHeight = 20; + this.deleteFileButtonWidth = 60; + this.addFilesButtonHeightOnStatus = 20; + this.addFilesButtonWidthOnStatus = 60; + this.statusLabelHeight = 20; + + this.uploadButtonVisible = true; + + this.defaultMargin = 4; + this.leftMargin = 10; + this.rightMargin = 10; + this.topMargin = 5; + + this.fileInfoMap = new Map(); + this.childFileInfoList = []; + this.folderInfoMap = new Map(); + this.totalFileSize = 0; + this.totalUploadedFileSize = 0; + this.totalUploadedFileSizeForFolder = 0; + this.currentUploadItemIndex = 0; + this.currentUploadItemIndexForFolder = 0; + this.uploadUrl = ""; + this.configUrl = ""; + this.uploadedFileInfoList = []; + this.modifiedFilesInfoList = []; + + this.dataGrid; + + this.fontFamily = "Malgun Gothic"; + + // event + this.onStartUpload = ""; + this.onStartUploadItem = ""; + this.onEndUploadItem = ""; + this.onEndUpload = ""; + this.onCloseMonitorWindow = ""; + this.onCancelUploadItem = ""; + this.onException = ""; + this.onDblClickGridRow = ""; + + this.uploadStatus = "WAIT"; + + this.progressTimer; + this.startTime = 0; // for checking speed + this.lastExceptionInfo = ''; + + this.allowedFileExtensionList = []; + this.fileExtensionCheckMode = "NORMAL"; // NORMAL, REVERSE + this.maxFileCount = -1; + this.maxTotalFileSize = -1; + this.maxFileSize = this.global.MAX_FILE_SIZE; + this.uploadMode = "BASIC"; // BASIC, LARGE, RESUME + this.fileGroupId = ""; + + this.selectedResumeMode = "NEW"; // NEW, RESUME + + this.isAsc = true; + this.currentSortCol = ""; + this.create = function (properties, eventNames) + { + this.setEvnetNames(eventNames); + this.setProperties(properties); + //this.createControls(); + this.setEventHandler(); + this.setUploadStatus("WAIT"); + this.setLastExceptionInfo(''); + }; + + this.setProperties = function (properties) + { + /* + var obj = jQuery.parseJSON(properties); + + if (obj.width.lastIndexOf("%") != -1) + this.width = Math.round(this.utils.getPxFromPercent(obj.containerId, "WIDTH") / 100 * this.utils.getDigitString(obj.width)); + else + this.width = this.utils.getDigitString(obj.width); + + if (obj.height.lastIndexOf("%") != -1) + this.height = Math.round(this.utils.getPxFromPercent(obj.containerId, "HEIGHT") / 100 * this.utils.getDigitString(obj.height)); + else + this.height = this.utils.getDigitString(obj.height); + + this.containerId = obj.containerId; + this.uploadUrl = obj.uploadUrl; + this.configUrl = obj.configUrl != undefined ? obj.configUrl : ""; + + this.uploadButtonVisible = obj.uploadButtonVisible == undefined ? true : false; + + + if (obj.configUrl != undefined) + this.configUrl = obj.configUrl; + if (obj.uploadMode != undefined) + this.uploadMode = obj.uploadMode; + if (obj.fileGroupId != undefined) + this.fileGroupId = obj.fileGroupId; + + if (obj.maxFileCount != undefined) + this.setMaxFileCount(obj.maxFileCount); + if (obj.maxFileSize != undefined) + this.setMaxFileSize(obj.maxFileSize); + if (obj.maxTotalFileSize != undefined) + this.setMaxTotalFileSize(obj.maxTotalFileSize); + */ + + if (properties == undefined) + return; + + var obj = jQuery.parseJSON(properties); + + this.containerId = obj.containerId; + + this.createControls(); + this.resetProperties(properties); + this.createImagePreview(); + }; + + this.resetProperties = function (properties) + { + if (properties == undefined) + return; + + var obj = jQuery.parseJSON(properties); + + // sort + var data = this.dataGrid.getColumns(); + data[1].sortable = obj.sortable == undefined ? false : obj.sortable; + data[2].sortable = obj.sortable == undefined ? false : obj.sortable; + data[3].sortable = obj.sortable == undefined ? false : obj.sortable; + this.dataGrid.setColumns(data) + + this.uploadUrl = obj.uploadUrl; + this.configUrl = obj.configUrl != undefined ? obj.configUrl : ""; + + // 하위 호환성을 위해 남겨둔 프로퍼티 + this.uploadButtonVisible = obj.uploadButtonVisible == undefined ? true : false; + + if (obj.width != undefined) { + if (obj.width.lastIndexOf("%") != -1) + this.width = Math.round(this.utils.getPxFromPercent(this.containerId, "WIDTH") / 100 * this.utils.getDigitString(obj.width)); + else + this.width = this.utils.getDigitString(obj.width); + $('#' + this.mainPanel).css('width', this.width + 'px'); + } + if (obj.height != undefined) { + + if (obj.height.lastIndexOf("%") != -1) + this.height = Math.round(this.utils.getPxFromPercent(this.containerId, "HEIGHT") / 100 * this.utils.getDigitString(obj.height)); + else + this.height = this.utils.getDigitString(obj.height); + $('#' + this.mainPanel).css('height', this.height + 'px'); + } + if (obj.borderColor != undefined) { + $('#' + this.mainPanel).css('border-color', obj.borderColor); + } + if (obj.topPanelDisplayStyle != undefined) { + $('#' + this.buttonPanel).css('display', obj.topPanelDisplayStyle); + $('#' + this.topSplitLine).css('display', obj.topPanelDisplayStyle); + } + + // 파일 선택 버튼 설정 + if (obj.selectFilesButtonDisplayStyle != undefined) + obj.selectFilesButtonDisplayStyle == 'block' ? $('#' + this.addFilesButton).show() : $('#' + this.addFilesButton).hide(); + if (obj.selectFilesButtonDisabledStyle != undefined) + $('#' + this.addFilesButton).prop('disabled', obj.selectFilesButtonDisabledStyle); + + // 폴더 선택 버튼 설정 + if (obj.selectFolderButtonDisplayStyle != undefined) + obj.selectFolderButtonDisplayStyle == 'block' ? $('#' + this.addFolderButton).show() : $('#' + this.addFolderButton).hide(); + if (obj.selectFolderButtonDisabledStyle != undefined) + $('#' + this.addFolderButton).prop('disabled', obj.selectFolderButtonDisabledStyle); + + // 업로드 버튼 설정 + if (obj.uploadButtonDisplayStyle != undefined) + $('#' + this.uploadButton).css('display', obj.uploadButtonDisplayStyle); + if (obj.uploadButtonDisabledStyle != undefined) + $('#' + this.uploadButton).prop('disabled', obj.uploadButtonDisabledStyle); + + // 버튼 패널 설정 + if (obj.selectFilesButtonDisplayStyle != undefined && obj.selectFilesButtonDisplayStyle == 'none' && + obj.selectFolderButtonDisplayStyle != undefined && obj.selectFolderButtonDisplayStyle == 'none' && + obj.uploadButtonDisplayStyle != undefined && obj.uploadButtonDisplayStyle == 'none') + { + $('#' + this.buttonPanel).css('display', 'none'); + $('#' + this.topSplitLine).css('display', 'none'); + } + + if (obj.selectFilesButtonDisplayStyleOnStatus != undefined) + obj.selectFilesButtonDisplayStyleOnStatus == 'block' ? $('#' + this.addFilesButtonOnStatus).show() : $('#' + this.addFilesButtonOnStatus).hide(); + + // 크기, 위치 변경 + $('#' + this.buttonPanel).css('width', this.width + 'px'); + $('#' + this.topSplitLine).css('width', this.width + 'px'); + + var dataGridWidth = this.width - (this.leftMargin + this.rightMargin); + var dataGridHeight = 0; + if ($('#' + this.buttonPanel).css('display') == 'block') { + dataGridHeight = this.height - (this.buttonPanelHeight + this.topSplitLineHeight + this.statusPanelHeight + (this.topMargin * 3)); + $('#' + this.managerDataGrid).css('margin-top', this.topMargin + 'px'); + } + if ($('#' + this.buttonPanel).css('display') == 'none') { + dataGridHeight = this.height - (this.statusPanelHeight + (this.topMargin * 4)); + $('#' + this.managerDataGrid).css('margin-top', (this.topMargin * 2) + 'px'); + } + $('#' + this.managerDataGrid).css('width', dataGridWidth + 'px'); + $('#' + this.managerDataGrid).css('height', dataGridHeight + 'px'); + self.dataGrid.width = dataGridWidth; + self.dataGrid.height = dataGridHeight; + var columns = self.dataGrid.getColumns(); + columns[1].width = dataGridWidth - 200; + columns[2].width = 100; + columns[3].width = 100; + self.dataGrid.setColumns(columns); + + $('#' + this.statusPanel).css('width', dataGridWidth + 'px'); + if (obj.configUrl != undefined) + this.configUrl = obj.configUrl; + if (obj.uploadMode != undefined) + this.uploadMode = obj.uploadMode; + if (obj.fileGroupId != undefined) + this.fileGroupId = obj.fileGroupId; + if (obj.maxFileCount != undefined) + this.setMaxFileCount(obj.maxFileCount); + if (obj.maxFileSize != undefined) + this.setMaxFileSize(obj.maxFileSize); + if (obj.maxTotalFileSize != undefined) + this.setMaxTotalFileSize(obj.maxTotalFileSize); + + if (obj.imagePreviewLayerClass != undefined) + this.imagePreviewLayerClass = obj.imagePreviewLayerClass; + + if (obj.imagePreviewBgLayerClass != undefined) + this.imagePreviewBgLayerClass = obj.imagePreviewBgLayerClass; + }; + + + this.createControls = function () + { + // Main panel + $('#' + this.containerId).append(this.utils.stringFormat('
', + this.mainPanel, this.width, this.height)); + + // Button panel + $('#' + this.mainPanel).append(this.utils.stringFormat('
', + this.buttonPanel, this.width, this.buttonPanelHeight)); + $('#' + this.buttonPanel).append(this.utils.stringFormat('', this.fileButton)); + $('#' + this.buttonPanel).append(this.utils.stringFormat('', + this.addFilesButton, this.buttonWidth, this.buttonHeight, this.leftMargin, this.topMargin, this.fontFamily)); + //'background-image:url(../../app/image/select-file.png);background-repeat: no-repeat;background-position:left;padding-left:18px;" />', + // Folder button + $('#' + this.buttonPanel).append(this.utils.stringFormat('', this.folderButton)); + // Add folder button + $('#' + this.buttonPanel).append(this.utils.stringFormat('', + this.addFolderButton, this.buttonWidth, this.buttonHeight, this.leftMargin, this.topMargin, this.fontFamily)); + // Upload button + $('#' + this.buttonPanel).append(this.utils.stringFormat('', + this.uploadButton, this.buttonWidth, this.buttonHeight, this.rightMargin, 5, this.fontFamily, this.uploadButtonVisible ? 'block' : 'none')); + + // Top split line + $('#' + this.mainPanel).append(this.utils.stringFormat('
', + this.topSplitLine, this.width, this.topSplitLineHeight)); + + // DataGrid + var dataGridWidth = this.width - (this.leftMargin + this.rightMargin); + var dataGridHeight = this.height - (this.buttonPanelHeight + this.topSplitLineHeight + this.statusPanelHeight + (this.topMargin * 3)); + $('#' + this.mainPanel).append(this.utils.stringFormat('
', + this.managerDataGrid, dataGridWidth, dataGridHeight, this.leftMargin, this.topMargin)); + + var checkboxSelector = new Slick.CheckboxSelectColumn({ + cssClass: "slick-cell-checkboxsel", + toolTip: "전체선택/전체해제" + }); + + var gridWidth = this.width - (this.leftMargin + this.rightMargin); + var fieldWidth = 100; + var grid; + var columns = [ + checkboxSelector.getColumnDefinition(), + { + id: "title", name: "파일이름", field: "title", width: gridWidth - (fieldWidth * 2), sortable: false, sorter: this.numericSorter, + formatter: function (args) + { + //return " " + data[args].title + "" + return " " + data[args].title + "" + } + }, + { id: "size", name: "크기", field: "size", width: fieldWidth, cssClass: "slick-grid-filesize", sortable: false, sorter: this.sizeSorter }, + { id: "status", name: "상태", field: "status", width: fieldWidth, cssClass: "slick-grid-transfer-status", sortable: false, sorter: this.numericSorter } + ]; + + var options = { + enableCellNavigation: true, + enableColumnReorder: false, + editable: true, + enableCellNavigation: true, + forceFitColumns: true, + autoEdit: false + }; + + + var data = []; + //self.dataGrid = new Slick.Grid("#" + self.managerDataGrid, data, columns, options); + + var dataView = new Slick.Data.DataView(); + dataView.setItems(data); + self.dataGrid = new Slick.Grid("#" + self.managerDataGrid, dataView.getItems(), columns, options); + + + self.dataGrid.setSelectionModel(new Slick.RowSelectionModel({ selectActiveRow: true })); + self.dataGrid.registerPlugin(checkboxSelector); + self.dataGrid.onSort.subscribe(function (e, args) + { + self.dataGrid.setSelectedRows([]); + self.dataGrid.resetActiveCell(); + + self.currentSortCol = args.sortCol.field; + self.isAsc = args.sortAsc ? 1 : -1; + + dataView.sort(args.sortCol.sorter, self.isAsc); + args.grid.invalidateAllRows(); + args.grid.render(); + }); + + self.dataGrid.onDblClick.subscribe(this.onDblClickGridRowHandler); + + + //$(function () { + //}); + + // Status panel + var statusPanelWidth = dataGridWidth; + $('#' + this.mainPanel).append(this.utils.stringFormat('
', + this.statusPanel, statusPanelWidth, this.statusPanelHeight, this.leftMargin)); + + /* + $('#' + this.statusPanel).append(this.utils.stringFormat(' ' + + 'X 삭제', + this.deleteFileButtonWidth, this.deleteFileButtonHeight, this.deleteFileButton, this.defaultMargin, 6, this.fontFamily)); + */ + + $('#' + this.statusPanel).append(this.utils.stringFormat('', + this.deleteFileButton, this.deleteFileButtonWidth, this.deleteFileButtonHeight, 0, this.defaultMargin, this.fontFamily)); + + $('#' + this.statusPanel).append(this.utils.stringFormat('', + this.addFilesButtonOnStatus, this.addFilesButtonWidthOnStatus, this.addFilesButtonHeightOnStatus, 0, this.defaultMargin, this.fontFamily)); + + + $('#' + this.deleteFileButton).on("mouseover", function () + { + $(this).css("color", "#E0E0E0"); + $(this).css("outline", "none"); + }).on("mouseout", function () + { + $(this).css("color", "white"); + }); + + $('#' + this.addFilesButtonOnStatus).on("mouseover", function () + { + $(this).css("color", "#E0E0E0"); + $(this).css("outline", "none"); + }).on("mouseout", function () + { + $(this).css("color", "white"); + }); + + $('#' + this.statusPanel).append(this.utils.stringFormat('0개의 파일 : 0.00B', + this.statusLabel, this.statusLabelHeight, this.rightMargin, 6, this.fontFamily)); + + + $.contextMenu({ + selector: '#' + this.mainPanel, + callback: function (key, options) + { + if (key == "addFiles") + self.onClickAddFilesButton(); + if (key == "addFolder") + self.onClickAddFolderButton(); + else if (key == "deleteFiles") + self.onClickDeleteFileButton(); + else if (key == "deleteAllFiles") + self.deleteAllFiles(); + }, + items: { + /* + "edit": { name: "Edit", icon: "edit" }, + "cut": { name: "Cut", icon: "cut" }, + copy: { name: "Copy", icon: "copy" }, + "paste": { name: "Paste", icon: "paste" }, + "delete": { name: "Delete", icon: "delete" }, + "sep1": "---------", + "quit": { + name: "Quit", icon: function () + { + return 'context-menu-icon context-menu-icon-quit'; + } + } + */ + "addFiles": { name: "파일선택" }, + "addFolder": { name: "폴더선택" }, + "deleteFiles": { name: "파일삭제" }, + "deleteAllFiles": { name: "전체파일삭제" }, + } + }); + }; + + this.createImagePreview = function() + { + if (this.imagePreviewBgLayerClass == undefined || this.imagePreviewBgLayerClass == "" || + this.imagePreviewLayerClass == undefined || this.imagePreviewLayerClass == "") + return; + + $('body').append(this.utils.stringFormat('', + this.imagePreviewBgPanel, this.imagePreviewBgLayerClass)); + + $('body').append(this.utils.stringFormat('', + this.imagePreviewPanel, this.imagePreviewLayerClass)); + + $('#' + this.imagePreviewPanel).append(this.utils.stringFormat('', + this.previewImage)); + + $('#' + this.imagePreviewPanel).append(''); + + } + + this.onClosePreviewImage = function () + { + var imagePreviewBgPanel = document.getElementById(self.imagePreviewBgPanel); + var imagePreviewPanel = document.getElementById(self.imagePreviewPanel); + + imagePreviewBgPanel.style.display = "none"; + imagePreviewPanel.style.display = "none"; + } + + this.onDblClickGridRowHandler = function (e, args) + { + var manager = self; + manager.dispatchEvent(manager.onDblClickGridRow, args.row); + } + + this.openPreviewIamge = function (index) + { + if (!(File && Image)) + { + //alert("Not supoorted browser"); + return; + } + + var fileInfo = self.getFileInfoFromMap(index); + if (fileInfo.fileType == "NORMAL" && this.getAcceptedImageForPreview(fileInfo.fileName)) + { + var image = new Image(); + image.onload = function (e) + { + var previewImageObj = document.getElementById(self.previewImage); + + if (previewImageObj && previewImageObj.style) + { + var browserSize = { + width: window.innerWidth || document.body.clientWidth, + height: window.innerHeight || document.body.clientHeight + } + + var imageBoxSize = { width: browserSize.width / 100 * 60, height: browserSize.height / 100 * 80 }; + + if (image.width > imageBoxSize.width || image.height > imageBoxSize.height) + { + if (image.width > image.height) + { + previewImageObj.style.width = imageBoxSize.width + 'px'; + previewImageObj.style.height = 'auto'; + } + else + { + previewImageObj.style.width = 'auto'; + previewImageObj.style.height = imageBoxSize.height + 'px'; + } + } + else + { + previewImageObj.style.width = image.width + 'px'; + previewImageObj.style.height = image.height + 'px'; + } + } + + previewImageObj.setAttribute('src', image.src); + document.getElementById(self.imagePreviewBgPanel).style.display = "block";; + document.getElementById(self.imagePreviewPanel).style.display = "block";; + }; + image.src = window.URL.createObjectURL(fileInfo.file); + } + + } + + this.getAcceptedImageForPreview = function(fileName) + { + var extension = ""; + var extensionArray = ["png", "jpg", "jpeg", "ico", "gif", "bmp"]; + + var index = fileName.lastIndexOf('.'); + if (index != -1) + { + extension = fileName.substring(index + 1); + extension = extension.toLowerCase(); + } + else + { + return false; + } + + for (var i = 0; i < extensionArray.length; i++) + { + if (extension == extensionArray[i]) + return true; + } + return false; + } + + this.getItem = function (index) + { + return this.isAsc ? data[indices[currentSortCol.id][index]] : data[indices[currentSortCol.id][(data.length - 1) - index]]; + return this.isAsc ? this.dataGrid.getDataItem(index) : this.dataGrid.getDataItem(index) + } + this.getLength = function () + { + return data.length; + } + + + this.onClickAddFilesButton = function () + { + self.selectFiles(); + }; + + this.selectFiles = function () { + $('#' + self.fileButton).click(); + } + + //// + + this.onClickAddFolderButton = function () + { + self.selectFolder(); + }; + + + this.selectFolder = function () + { + $('#' + self.folderButton).click(); + } + + //// + // 선택한 모든 데이터가 삭제되도록 수정 + // 20170516 + /* + this.onClickDeleteFileButton = function () { + var grid = self.dataGrid; + var dataList = grid.getData(); + if (grid.getActiveCell()) { + var currentRow = grid.getActiveCell().row; + self.deleteFiles(currentRow); + + dataList.splice(currentRow, 1); + var r = currentRow; + while (r < dataList.length) { + grid.invalidateRow(r); + r++; + } + grid.updateRowCount(); + grid.render(); + grid.scrollRowIntoView(currentRow - 1) + } + }; + */ + this.onClickDeleteFileButton = function () + { + var grid = self.dataGrid; + var dataList = grid.getData(); + var rowsToDelete = grid.getSelectedRows().sort().reverse(); + + for (var i = 0; i < rowsToDelete.length; i++) + { + self.deleteFiles(rowsToDelete[i]); + dataList.splice(rowsToDelete[i], 1); + + grid.scrollRowIntoView(rowsToDelete[i] - 1) + } + + grid.invalidate(); + grid.setSelectedRows([]); + grid.resetActiveCell(); + }; + //// + + this.onClickAddFilesButtonOnStatus = function () + { + self.selectFiles(); + }; + + this.deleteFiles = function (currentRow) + { + var fileInfo = this.getFileInfoFromMap(currentRow); + + if (fileInfo.fileType == 'UPLOADED') + { + for (var i = 0; i < this.modifiedFilesInfoList.length; i++) + { + if (fileInfo.id == this.modifiedFilesInfoList[i].id) + { + this.modifiedFilesInfoList[i].isDeleted = true; + break; + } + } + } + else if (fileInfo.fileType == 'FOLDER') + { + this.folderInfoMap.delete(fileInfo.folderId); + } + + this.totalFileSize -= fileInfo.fileSize; + this.deleteFileInfoFromMap(currentRow); + this.updateStatus(); + }; + + this.deleteAllFiles = function () + { + var grid = self.dataGrid; + var dataList = grid.getData(); + //var rowsToDelete = grid.getSelectedRows().sort().reverse(); + + while (0 < dataList.length) + { + self.deleteFiles(0); + dataList.splice(0, 1); + + grid.scrollRowIntoView(0 - 1) + } + + grid.invalidate(); + grid.setSelectedRows([]); + grid.resetActiveCell(); + } + + //// + // private + this.onClickUploadFileButton = function () + { + if (self.uploadMode == "BASIC") + self.startUpload(); + else + self.startLargeUpload(); + }; + + this.startUpload = function () + { + var manager = self; + var monitor = parent.fileUploadMonitor; + + if (manager.fileInfoMap.size == 0) + { + alert("업로드 할 파일을 선택해 주십시오."); + return; + } + + manager.currentUploadItemIndex = 0; + manager.currentUploadItemIndexForFolder = 0; + + // 업로드 모니터에 데이터 전달 + monitor.clear(); + monitor.addFiles(); + monitor.open(); + + manager.startTime = new Date().getTime(); + manager.progressTimer = setInterval(manager.startProgressTimer, 500); + + manager.totalUploadedFileSize = 0; + manager.totalUploadedFileSizeForFolder = 0; + + manager.setUploadStatus("TRANSFERRING"); + monitor.resetButtonStatus(); + manager.dispatchEvent(manager.onStartUpload); + manager.sendFormData(); + }; + + this.startLargeUpload = function () + { + var manager = self; + var monitor = parent.fileUploadMonitor; + + if (manager.fileInfoMap.size == 0) { + alert("업로드 할 파일을 선택해 주십시오."); + return; + } + + manager.currentUploadItemIndex = 0; + manager.currentUploadItemIndexForFolder = 0; + + // 업로드 모니터에 데이터 전달 + monitor.clear(); + monitor.addFiles(); + monitor.open(); + + manager.startTime = new Date().getTime(); + manager.progressTimer = setInterval(manager.startProgressTimer, 500); + + manager.totalUploadedFileSize = 0; + manager.totalUploadedFileSizeForFolder = 0; + + manager.setUploadStatus("TRANSFERRING"); + monitor.resetButtonStatus(); + manager.dispatchEvent(manager.onStartUpload); + manager.sendLargeFormData(); + }; + this.startProgressTimer = function () + { + var manager = self; + var fileInfo = manager.getFileInfoFromMap(manager.currentUploadItemIndex); + manager.updateProgressStatus(fileInfo.status, fileInfo.transferedSize); + }; + + this.setEventHandler = function () + { + $('#' + this.addFilesButton).bind("click", this.onClickAddFilesButton); + $('#' + this.addFolderButton).bind("click", this.onClickAddFolderButton); + $('#' + this.deleteFileButton).bind("click", this.onClickDeleteFileButton); + $('#' + this.addFilesButtonOnStatus).bind("click", this.onClickAddFilesButtonOnStatus); + $('#' + this.uploadButton).bind("click", this.onClickUploadFileButton); + $('#' + this.imagePreviewPanel).bind("click", this.onClosePreviewImage); + + /* + $('#' + this.fileButton).bind("change", this.onFileSelect); + $('#' + this.managerDataGrid).bind("dragover", this.onDragOver); + $('#' + this.managerDataGrid).bind("drop", this.onDrop)n + */ + + document.getElementById(this.fileButton).addEventListener("change", this.onFileSelect, false); + document.getElementById(this.folderButton).addEventListener("change", this.onFolderSelect, false); + document.getElementById(this.managerDataGrid).addEventListener("dragover", this.onDragOver, false); + document.getElementById(this.managerDataGrid).addEventListener("drop", this.onDrop, false); + + }; + + this.updateStatus = function () + { + if (this.folderInfoMap.size > 0) + { + var status = this.utils.stringFormat('{0}개의 폴더, {1}개의 파일 : {2}', + this.folderInfoMap.size, + this.fileInfoMap.size - this.folderInfoMap.size, + this.utils.convertByteUnit(this.totalFileSize)); + } + else + { + var status = this.utils.stringFormat('{0}개의 파일 : {1}', + this.fileInfoMap.size, + this.utils.convertByteUnit(this.totalFileSize)); + } + + $('#' + this.statusLabel).text(status); + } + + this.updateProgressStatus = function (status, loaded, isFolder) + { + var manager = self; + var monitor = parent.fileUploadMonitor; + + fileInfo = manager.getFileInfoFromMap(manager.currentUploadItemIndex); + fileInfo.status = status; + + if (isFolder == true && status == "COMPLETION") + { + var childFileInfo = manager.childFileInfoList[manager.currentUploadItemIndexForFolder]; + manager.totalUploadedFileSizeForFolder += childFileInfo.fileSize; + fileInfo.transferedSize = manager.totalUploadedFileSizeForFolder; + fileInfo.status = "TRANSFERRING"; + loaded = childFileInfo.fileSize; + } + + var statusLabel = ""; + if (fileInfo.status == "COMPLETION") + { + fileInfo.transferedSize = fileInfo.fileSize; + manager.totalUploadedFileSize += fileInfo.transferedSize; + statusLabel = "완료"; + } + else if (fileInfo.status == "CANCELLATION") { + fileInfo.transferedSize = 0; + statusLabel = "취소"; + } + else if (fileInfo.status == "FAILURE") { + fileInfo.transferedSize = 0; + statusLabel = "실패"; + } + else if (fileInfo.status == "TRANSFERRING") + { + fileInfo.transferedSize = loaded; + /* + if (fileInfo.fileType == 'FOLDER') + { + fileInfo.transferedSize = manager.totalUploadedFileSizeForFolder + loaded; + console.log(manager.totalUploadedFileSizeForFolder + " : " + loaded); + } + else + { + fileInfo.transferedSize = loaded; + } + */ + statusLabel = manager.utils.convertByteUnit(fileInfo.transferedSize); + } + else { + fileInfo.transferedSize = 0; + statusLabel = "대기"; + } + + // Title + $('#' + monitor.titleLabel).text(manager.utils.stringFormat('{0}개의 파일 중 {1}번째 파일을 업로드하고 있습니다.', + manager.fileInfoMap.size, manager.currentUploadItemIndex + 1)); + + // Each uploaded file size + manager.dataGrid.getDataItem(manager.currentUploadItemIndex)["status"] = statusLabel; + manager.dataGrid.updateCell(manager.currentUploadItemIndex, 2); + manager.dataGrid.render(); + + monitor.dataGrid.getDataItem(manager.currentUploadItemIndex)["status"] = statusLabel; + monitor.dataGrid.updateCell(manager.currentUploadItemIndex, 2); + monitor.dataGrid.render(); + + // Total uploaded file size + var transferedSize = (fileInfo.status == "COMPLETION") ? 0 : fileInfo.transferedSize; + $('#' + monitor.totalUploadedFileSizeLabel).text(manager.utils.convertByteUnit(manager.totalUploadedFileSize + transferedSize)); + $('#' + monitor.totalFileSizeLabel).text("/" + manager.utils.convertByteUnit(manager.totalFileSize)); + + // Upload speed + var currentTime = new Date().getTime(); + var totalUploadedFileSizePerMillisec = manager.getTotalUploadedFileSizePerMillisec(manager.totalUploadedFileSize + transferedSize, currentTime); + $('#' + monitor.transferSpeedLabel).text("(" + manager.utils.convertByteUnit(totalUploadedFileSizePerMillisec) + "/sec)"); + + // Remaining time + var remainingTime = 0; + var remainingFileSize = manager.totalFileSize - (manager.totalUploadedFileSize + transferedSize); + if (remainingFileSize > 0 && totalUploadedFileSizePerMillisec > 0) + remainingTime = ((remainingFileSize * 1000.0) / totalUploadedFileSizePerMillisec) / 1000; + $('#' + monitor.remainingTimeLabel).text(parseInt(remainingTime, 10)); + + + // Percent + var percent = ((manager.totalUploadedFileSize + transferedSize) / manager.totalFileSize) * 100; + percent = parseInt(percent, 10); + $('#' + monitor.totalUploadedPercentLabel).text(percent.toString() + "%"); + + // 프로그래스바 + $('#' + monitor.progressBar).val(percent); + + }; + + this.getTotalUploadedFileSizePerMillisec = function (totalUploadedFileSize, currentTime) + { + var totalUploadedFileSizePerMillisec = 0; + if (this.totalFileSize > 0 && totalUploadedFileSize > 0 && (currentTime - this.startTime) > 0) { + totalUploadedFileSizePerMillisec = (totalUploadedFileSize * 1000) / (currentTime - this.startTime); + } + return totalUploadedFileSizePerMillisec; + }; + + + this.onDrop = function (event) + { + event.stopPropagation(); + event.preventDefault(); + self.addFiles(event.dataTransfer.files); + self.updateStatus(); + } + + + this.onDragOver = function (event) + { + event.stopPropagation(); + event.preventDefault(); + event.dataTransfer.dropEffect = "move"; + } + + this.nextOrEndUpload = function () + { + var manager = self; + var monitor = parent.fileUploadMonitor; + + if ((manager.currentUploadItemIndex + 1) == manager.fileInfoMap.size) { + clearInterval(manager.progressTimer); + manager.setUploadStatus('COMPLETION'); + monitor.resetButtonStatus(); + + manager.dispatchEvent(manager.onEndUpload); + + if (monitor.getCloseMonitorCheckBoxStatus() == true) { + monitor.close(); + manager.dispatchEvent(manager.onCloseMonitorWindow); + } + } + else { + manager.currentUploadItemIndex++; + if(manager.uploadMode == "BASIC") + setTimeout(manager.sendFormData(), 0); + else + setTimeout(manager.sendLargeFormData(), 0); + } + }; + + //// + // private + this.nextOrEndUploadForFolder = function () + { + var manager = self; + + manager.currentUploadItemIndexForFolder++; + + if (manager.uploadMode == "BASIC") + setTimeout(manager.sendFormData(), 0); + else + setTimeout(manager.sendLargeFormData(), 0); + }; + + this.sendFormData = function () + { + if (this.getUploadStatus() != "TRANSFERRING") + return; + + var fileInfo = this.getFileInfoFromMap(this.currentUploadItemIndex); + + if (fileInfo.fileType == 'FOLDER' && (fileInfo.status == "WAIT" || fileInfo.status == "TRANSFERRING")) + { + this.sendFormDataForFolder(fileInfo); + return; + } + else if (fileInfo.fileType == 'FOLDER') + { + this.nextOrEndUpload(); + return; + } + + // WAIT인 것만 업로드 + if (fileInfo.status != "WAIT") { + if (fileInfo.status == "COMPLETION") + this.updateProgressStatus('COMPLETION'); + + this.nextOrEndUpload(); + return; + } + + if (this.getUploadStatus() != "TRANSFERRING") + return; + + // 게시판 수정 모드 처리 + if (fileInfo.fileType == "UPLOADED") { + this.dispatchEvent(this.onStartUploadItem, this.currentUploadItemIndex); + this.updateProgressStatus('COMPLETION'); + this.dispatchEvent(this.onEndUploadItem, this.currentUploadItemIndex); + + this.nextOrEndUpload(); + return; + } + + if (this.getUploadStatus() != "TRANSFERRING") + return; + + this.updateProgressStatus("TRANSFERRING", 0); + this.dispatchEvent(this.onStartUploadItem, this.currentUploadItemIndex); + + var formData = new FormData(); + formData.append("CU_FILE", fileInfo.file); + + fileInfo.xmlHttpRequest = new XMLHttpRequest(); + fileInfo.xmlHttpRequest.open("POST", this.uploadUrl, true); + + fileInfo.xmlHttpRequest.onreadystatechange = function () + { + var manager = self; + var monitor = parent.fileUploadMonitor; + var fileInfo = manager.getFileInfoFromMap(manager.currentUploadItemIndex); + + if (fileInfo.xmlHttpRequest.readyState == 4 && fileInfo.xmlHttpRequest.status == 200) { + + manager.uploadedFileInfoList.push(fileInfo.xmlHttpRequest.responseText.trim()); + manager.updateProgressStatus('COMPLETION'); + manager.dispatchEvent(manager.onEndUploadItem, manager.currentUploadItemIndex); + + // Next or end upload + manager.nextOrEndUpload(); + } + else if (fileInfo.xmlHttpRequest.readyState == 4 && fileInfo.xmlHttpRequest.status >= 500) { + clearInterval(manager.progressTimer); + manager.updateProgressStatus('FAILURE'); + manager.setUploadStatus('FAILURE'); + monitor.resetButtonStatus(); + + var keys = new Array('code', 'message', 'detailMessage'); + var values = new Array(manager.global.HTTP_STATUS_ERROR, fileInfo.xmlHttpRequest.status.toString().trim(), fileInfo.xmlHttpRequest.responseText.trim()); + manager.setLastExceptionInfo(manager.utils.getJsonString(keys, values)); + manager.dispatchEvent(manager.onException); + } + }; + + fileInfo.xmlHttpRequest.upload.addEventListener("progress", this.updateProgress, false); + fileInfo.xmlHttpRequest.addEventListener("load", this.transferComplete, false); + fileInfo.xmlHttpRequest.upload.addEventListener("error", this.transferFailed, false); + fileInfo.xmlHttpRequest.addEventListener("abort", this.transferCanceled, false); + + fileInfo.xmlHttpRequest.send(formData); + }; + + + this.sendFormDataForFolder = function (parentFileInfo) + { + if (this.getUploadStatus() != "TRANSFERRING") + return; + + this.childFileInfoList = this.folderInfoMap.get(parentFileInfo.folderId); + + var childFileInfo = this.childFileInfoList[this.currentUploadItemIndexForFolder]; + + // WAIT인 것만 업로드 + if (childFileInfo.status != "WAIT") + { + if (childFileInfo.status == "COMPLETION") + this.updateProgressStatus('COMPLETION'); + + this.nextOrEndUploadFolder(); + return; + } + + if (this.getUploadStatus() != "TRANSFERRING") + return; + + // 처음 폴더를 업로드 할 때만 이벤트 변경을 한다. + if (parentFileInfo.status == "WAIT") + { + this.updateProgressStatus("TRANSFERRING", 0); + this.dispatchEvent(this.onStartUploadItem, this.currentUploadItemIndex); + } + + + var formData = new FormData(); + + formData.append("CU_FILE_DIR_PATH", childFileInfo.fileDirPath); + formData.append("CU_FILE", childFileInfo.file); + + childFileInfo.xmlHttpRequest = new XMLHttpRequest(); + childFileInfo.xmlHttpRequest.open("POST", this.uploadUrl, true); + + childFileInfo.xmlHttpRequest.onreadystatechange = function () + { + var manager = self; + var monitor = parent.fileUploadMonitor; + var childFileInfo = manager.childFileInfoList[manager.currentUploadItemIndexForFolder]; + + if (childFileInfo.xmlHttpRequest.readyState == 4 && childFileInfo.xmlHttpRequest.status == 200) + { + + manager.uploadedFileInfoList.push(childFileInfo.xmlHttpRequest.responseText.trim()); + + if ((manager.currentUploadItemIndexForFolder + 1) == manager.childFileInfoList.length) + { + manager.updateProgressStatus('COMPLETION'); + manager.dispatchEvent(manager.onEndUploadItem, manager.currentUploadItemIndex); + + // Next or end upload + manager.currentUploadItemIndexForFolder = 0; + manager.totalUploadedFileSizeForFolder = 0; + manager.nextOrEndUpload(); + } + else + { + manager.updateProgressStatus('COMPLETION', 0, true); + manager.nextOrEndUploadForFolder(); + } + } + else if (childFileInfo.xmlHttpRequest.readyState == 4 && childFileInfo.xmlHttpRequest.status >= 500) + { + clearInterval(manager.progressTimer); + manager.updateProgressStatus('FAILURE'); + manager.setUploadStatus('FAILURE'); + monitor.resetButtonStatus(); + + var keys = new Array('code', 'message', 'detailMessage'); + var values = new Array(manager.global.HTTP_STATUS_ERROR, childFileInfo.xmlHttpRequest.status.toString(), childFileInfo.xmlHttpRequest.responseText.trim()); + manager.setLastExceptionInfo(manager.utils.getJsonString(keys, values)); + manager.dispatchEvent(manager.onException); + } + }; + + childFileInfo.xmlHttpRequest.upload.addEventListener("progress", this.updateProgress, false); + childFileInfo.xmlHttpRequest.addEventListener("load", this.transferComplete, false); + childFileInfo.xmlHttpRequest.upload.addEventListener("error", this.transferFailed, false); + childFileInfo.xmlHttpRequest.addEventListener("abort", this.transferCanceled, false); + + childFileInfo.xmlHttpRequest.send(formData); + }; + + this.sendLargeFormData = function () + { + if (this.getUploadStatus() != "TRANSFERRING") + return; + + var fileInfo = this.getFileInfoFromMap(this.currentUploadItemIndex); + + if (fileInfo.fileType == 'FOLDER' && (fileInfo.status == "WAIT" || fileInfo.status == "TRANSFERRING")) + { + this.sendLargeFormDataForFolder(fileInfo); + return; + } + else if (fileInfo.fileType == 'FOLDER') + { + this.nextOrEndUpload(); + return; + } + + // WAIT인 것만 업로드 + if (fileInfo.status != "WAIT") + { + if (fileInfo.status == "COMPLETION") + this.updateProgressStatus('COMPLETION'); + + this.nextOrEndUpload(); + return; + } + + if (this.getUploadStatus() != "TRANSFERRING") + return; + + // 게시판 수정 모드 처리 + if (fileInfo.fileType == "UPLOADED") { + this.dispatchEvent(this.onStartUploadItem, this.currentUploadItemIndex); + this.updateProgressStatus('COMPLETION'); + this.dispatchEvent(this.onEndUploadItem, this.currentUploadItemIndex); + + this.nextOrEndUpload(); + return; + } + + if (this.getUploadStatus() != "TRANSFERRING") + return; + + // 업로드 시작 알림 + this.updateProgressStatus("TRANSFERRING", 0); + this.dispatchEvent(this.onStartUploadItem, this.currentUploadItemIndex); + + + //// + // 기존 파일 정보 요청 + this.sendPartialFileInfo(fileInfo); + //// + + }; + + this.sendLargeFormDataForFolder = function (parentFileInfo) + { + if (this.getUploadStatus() != "TRANSFERRING") + return; + + this.childFileInfoList = this.folderInfoMap.get(parentFileInfo.folderId); + var childFileInfo = this.childFileInfoList[this.currentUploadItemIndexForFolder]; + + // WAIT인 것만 업로드 + if (childFileInfo.status != "WAIT") + { + if (fileInfo.status == "COMPLETION") + this.updateProgressStatus('COMPLETION'); + + this.nextOrEndUploadFolder(); + return; + } + + if (this.getUploadStatus() != "TRANSFERRING") + return; + + + // 처음 폴더를 업로드 할 때만 이벤트 변경을 한다. + if (parentFileInfo.status == "WAIT") + { + this.updateProgressStatus("TRANSFERRING", 0); + this.dispatchEvent(this.onStartUploadItem, this.currentUploadItemIndex); + } + + + //// + // 기존 파일 정보 요청 + this.sendPartialFileInfoForFolder(parentFileInfo); + //// + + }; + + this.sendPartialFileInfo = function (fileInfo) + { + if (this.getUploadStatus() != "TRANSFERRING") + return; + + var formData = new FormData(); + formData.append("CU_UPLOAD_MODE", this.uploadMode); + formData.append("CU_FILE_GROUP_ID", this.fileGroupId); + formData.append("CU_FILE_DIR_PATH", fileInfo.fileDirPath); + formData.append("CU_FILE_NAME", fileInfo.fileName); + formData.append("CU_FILE_SIZE", fileInfo.fileSize); + + fileInfo.xmlHttpRequest = new XMLHttpRequest(); + fileInfo.xmlHttpRequest.open("POST", this.configUrl, true); + + fileInfo.xmlHttpRequest.onreadystatechange = function () + { + var manager = self; + var monitor = parent.fileUploadMonitor; + var fileInfo = manager.getFileInfoFromMap(manager.currentUploadItemIndex); + + if (fileInfo.xmlHttpRequest.readyState == 4 && fileInfo.xmlHttpRequest.status == 200) + { + var partialInfo = jQuery.parseJSON(fileInfo.xmlHttpRequest.responseText.trim()); + + fileInfo.fileGroupId = partialInfo.fileGroupId; + fileInfo.fileNameKey = partialInfo.fileNameKey; + fileInfo.fileDirPath = partialInfo.fileDirPath; + fileInfo.tempFileSize = Number(partialInfo.tempFileSize); + fileInfo.transferedSize = fileInfo.tempFileSize; + fileInfo.tempFileUpdatedDate = partialInfo.tempFileUpdatedDate; + fileInfo.isExistedFile = partialInfo.isExistedFile; + + if (partialInfo.isExistedFile == true) + { + if (manager.uploadMode == "RESUME") + { + if (monitor.getApplyAllFilesCheckBoxStatus() == false) + { + monitor.openResumeOptionDlg(fileInfo); + } + else + { + // 대화상자에서 한번 선택했다고 가정한다. 또는 기본값이 NEW라고 가정한다. + var isNextPartialFile = manager.selectedResumeMode == "ADD" ? true : false; + manager.sendPartialFile(isNextPartialFile); + } + } + else + { + manager.sendPartialFile(false); + } + } + else + { + manager.sendPartialFile(false); + } + } + else if (fileInfo.xmlHttpRequest.readyState == 4 && fileInfo.xmlHttpRequest.status >= 500) + { + clearInterval(manager.progressTimer); + manager.updateProgressStatus('FAILURE'); + manager.setUploadStatus('FAILURE'); + monitor.resetButtonStatus(); + + var keys = new Array('code', 'message', 'detailMessage'); + var values = new Array(manager.global.HTTP_STATUS_ERROR, fileInfo.xmlHttpRequest.status.toString(), fileInfo.xmlHttpRequest.responseText.trim()); + manager.setLastExceptionInfo(manager.utils.getJsonString(keys, values)); + manager.dispatchEvent(manager.onException); + } + }; + + fileInfo.xmlHttpRequest.upload.addEventListener("progress", this.updateProgressForLargeFile, false); + fileInfo.xmlHttpRequest.addEventListener("load", this.transferComplete, false); + fileInfo.xmlHttpRequest.upload.addEventListener("error", this.transferFailed, false); + fileInfo.xmlHttpRequest.addEventListener("abort", this.transferCanceled, false); + + fileInfo.xmlHttpRequest.send(formData); + } + + + this.sendPartialFileInfoForFolder = function (parentFileInfo) + { + if (this.getUploadStatus() != "TRANSFERRING") + return; + + this.childFileInfoList = this.folderInfoMap.get(parentFileInfo.folderId); + + var childFileInfo = this.childFileInfoList[this.currentUploadItemIndexForFolder]; + + var formData = new FormData(); + formData.append("CU_UPLOAD_MODE", this.uploadMode); + formData.append("CU_FILE_GROUP_ID", this.fileGroupId); + formData.append("CU_FILE_DIR_PATH", childFileInfo.fileDirPath); + formData.append("CU_FILE_NAME", childFileInfo.fileName); + formData.append("CU_FILE_SIZE", childFileInfo.fileSize); + + childFileInfo.xmlHttpRequest = new XMLHttpRequest(); + childFileInfo.xmlHttpRequest.open("POST", this.configUrl, true); + + childFileInfo.xmlHttpRequest.onreadystatechange = function () + { + var manager = self; + var monitor = parent.fileUploadMonitor; + var parentFileInfo = manager.getFileInfoFromMap(manager.currentUploadItemIndex); + var childFileInfo = manager.childFileInfoList[manager.currentUploadItemIndexForFolder]; + + if (childFileInfo.xmlHttpRequest.readyState == 4 && childFileInfo.xmlHttpRequest.status == 200) + { + var partialInfo = jQuery.parseJSON(childFileInfo.xmlHttpRequest.responseText.trim()); + + childFileInfo.fileGroupId = partialInfo.fileGroupId; + childFileInfo.fileNameKey = partialInfo.fileNameKey; + childFileInfo.fileDirPath = partialInfo.fileDirPath; + childFileInfo.tempFileSize = Number(partialInfo.tempFileSize); + childFileInfo.transferedSize = childFileInfo.tempFileSize; + childFileInfo.tempFileUpdatedDate = partialInfo.tempFileUpdatedDate; + childFileInfo.isExistedFile = partialInfo.isExistedFile; + + if (partialInfo.isExistedFile == true) + { + if (manager.uploadMode == "RESUME") + { + if (monitor.getApplyAllFilesCheckBoxStatus() == false) + { + monitor.openResumeOptionDlg(childFileInfo); + } + else + { + // 대화상자에서 한번 선택했다고 가정한다. 또는 기본값이 NEW라고 가정한다. + var isNextPartialFile = manager.selectedResumeMode == "ADD" ? true : false; + manager.sendPartialFileForFolder(parentFileInfo, isNextPartialFile); + } + } + else + { + manager.sendPartialFileForFolder(parentFileInfo, false); + } + } + else + { + manager.sendPartialFileForFolder(parentFileInfo, false); + } + } + else if (childFileInfo.xmlHttpRequest.readyState == 4 && childFileInfo.xmlHttpRequest.status >= 500) + { + clearInterval(manager.progressTimer); + manager.updateProgressStatus('FAILURE'); + manager.setUploadStatus('FAILURE'); + monitor.resetButtonStatus(); + + var keys = new Array('code', 'message', 'detailMessage'); + var values = new Array(manager.global.HTTP_STATUS_ERROR, childFileInfo.xmlHttpRequest.status.toString(), childFileInfo.xmlHttpRequest.responseText.trim()); + manager.setLastExceptionInfo(manager.utils.getJsonString(keys, values)); + manager.dispatchEvent(manager.onException); + } + }; + + childFileInfo.xmlHttpRequest.upload.addEventListener("progress", this.updateProgressForLargeFile, false); + childFileInfo.xmlHttpRequest.addEventListener("load", this.transferComplete, false); + childFileInfo.xmlHttpRequest.upload.addEventListener("error", this.transferFailed, false); + childFileInfo.xmlHttpRequest.addEventListener("abort", this.transferCanceled, false); + + childFileInfo.xmlHttpRequest.send(formData); + } + + + this.sendPartialFile = function (isNextPartialFile) + { + if (this.getUploadStatus() != "TRANSFERRING") + return; + + var fileInfo = this.getFileInfoFromMap(this.currentUploadItemIndex); + + var startFilePos = 0; + //var endFilePos = 1024 * 4; + var endFilePos = 1024 * 1024 * 1024; + //var endFilePos = 1024 * 1024 * 1024 * 4; + + if (isNextPartialFile == true) + startFilePos = fileInfo.tempFileSize; + else + fileInfo.tempFileSize = 0; + + if (startFilePos + endFilePos > fileInfo.fileSize) + endFilePos = startFilePos + (fileInfo.fileSize - startFilePos); + else + endFilePos = startFilePos + endFilePos; + + var blobData = fileInfo.file.slice(startFilePos, endFilePos); + blobData.lastModifiedDate = new Date(); + blobData.name = fileInfo.fileName; + + var formData = new FormData(); + + formData.append("CU_UPLOAD_MODE", this.uploadMode); + formData.append("CU_START_FILE_POS", startFilePos); + formData.append("CU_FILE_GROUP_ID", this.fileGroupId); + formData.append("CU_FILE_DIR_PATH", fileInfo.fileDirPath); + formData.append("CU_FILE_NAME_KEY", fileInfo.fileNameKey); + formData.append("CU_FILE_NAME", fileInfo.fileName); + formData.append("CU_FILE_SIZE", fileInfo.fileSize); + formData.append("CU_FILE", blobData); + + fileInfo.xmlHttpRequest = new XMLHttpRequest(); + fileInfo.xmlHttpRequest.open("POST", this.uploadUrl, true); + + fileInfo.xmlHttpRequest.onreadystatechange = function () + { + var manager = self; + var monitor = parent.fileUploadMonitor; + var fileInfo = manager.getFileInfoFromMap(manager.currentUploadItemIndex); + + if (fileInfo.xmlHttpRequest.readyState == 4 && fileInfo.xmlHttpRequest.status == 200) { + + var partialInfo = jQuery.parseJSON(fileInfo.xmlHttpRequest.responseText.trim()); + + if(partialInfo.largeUploadStatus == "COMPLETION") + { + manager.uploadedFileInfoList.push(fileInfo.xmlHttpRequest.responseText.trim()); + manager.updateProgressStatus('COMPLETION'); + manager.dispatchEvent(manager.onEndUploadItem, manager.currentUploadItemIndex); + + // Next or end upload + manager.nextOrEndUpload(); + } + else + { + fileInfo.tempFileSize = Number(partialInfo.tempFileSize); + fileInfo.transferedSize = fileInfo.tempFileSize; + manager.sendPartialFile(true); + + } + } + else if (fileInfo.xmlHttpRequest.readyState == 4 && fileInfo.xmlHttpRequest.status >= 500) { + clearInterval(manager.progressTimer); + manager.updateProgressStatus('FAILURE'); + manager.setUploadStatus('FAILURE'); + monitor.resetButtonStatus(); + + var keys = new Array('code', 'message', 'detailMessage'); + var values = new Array(manager.global.HTTP_STATUS_ERROR, fileInfo.xmlHttpRequest.status.toString(), fileInfo.xmlHttpRequest.responseText.trim()); + manager.setLastExceptionInfo(manager.utils.getJsonString(keys, values)); + manager.dispatchEvent(manager.onException); + } + }; + + fileInfo.xmlHttpRequest.upload.addEventListener("progress", this.updateProgressForLargeFile, false); + fileInfo.xmlHttpRequest.addEventListener("load", this.transferComplete, false); + fileInfo.xmlHttpRequest.upload.addEventListener("error", this.transferFailed, false); + fileInfo.xmlHttpRequest.addEventListener("abort", this.transferCanceled, false); + + fileInfo.xmlHttpRequest.send(formData); + } + + this.sendPartialFileForFolder = function (parentFileInfo, isNextPartialFile) + { + if (this.getUploadStatus() != "TRANSFERRING") + return; + + this.childFileInfoList = this.folderInfoMap.get(parentFileInfo.folderId); + + var childFileInfo = this.childFileInfoList[this.currentUploadItemIndexForFolder]; + + var startFilePos = 0; + //var endFilePos = 1024 * 4; + var endFilePos = 1024 * 1024 * 1024; + //var endFilePos = 1024 * 1024 * 1024 * 4; + + if (isNextPartialFile == true) + startFilePos = childFileInfo.tempFileSize; + else + childFileInfo.tempFileSize = 0; + + if (startFilePos + endFilePos > childFileInfo.fileSize) + endFilePos = startFilePos + (childFileInfo.fileSize - startFilePos); + else + endFilePos = startFilePos + endFilePos; + + var blobData = childFileInfo.file.slice(startFilePos, endFilePos); + blobData.lastModifiedDate = new Date(); + blobData.name = childFileInfo.fileName; + + var formData = new FormData(); + + formData.append("CU_UPLOAD_MODE", this.uploadMode); + formData.append("CU_START_FILE_POS", startFilePos); + formData.append("CU_FILE_GROUP_ID", this.fileGroupId); + formData.append("CU_FILE_DIR_PATH", childFileInfo.fileDirPath); + formData.append("CU_FILE_NAME_KEY", childFileInfo.fileNameKey); + formData.append("CU_FILE_NAME", childFileInfo.fileName); + formData.append("CU_FILE_SIZE", childFileInfo.fileSize); + formData.append("CU_FILE", blobData); + + childFileInfo.xmlHttpRequest = new XMLHttpRequest(); + childFileInfo.xmlHttpRequest.open("POST", this.uploadUrl, true); + + childFileInfo.xmlHttpRequest.onreadystatechange = function () + { + var manager = self; + var monitor = parent.fileUploadMonitor; + var parentFileInfo = manager.getFileInfoFromMap(manager.currentUploadItemIndex); + var childFileInfo = manager.childFileInfoList[manager.currentUploadItemIndexForFolder]; + + if (childFileInfo.xmlHttpRequest.readyState == 4 && childFileInfo.xmlHttpRequest.status == 200) + { + + var partialInfo = jQuery.parseJSON(childFileInfo.xmlHttpRequest.responseText.trim()); + + if (partialInfo.largeUploadStatus == "COMPLETION") + { + manager.uploadedFileInfoList.push(childFileInfo.xmlHttpRequest.responseText.trim()); + + if ((manager.currentUploadItemIndexForFolder + 1) == manager.childFileInfoList.length) + { + manager.updateProgressStatus('COMPLETION'); + manager.dispatchEvent(manager.onEndUploadItem, manager.currentUploadItemIndex); + + // Next or end upload + manager.currentUploadItemIndexForFolder = 0; + manager.totalUploadedFileSizeForFolder = 0; + manager.nextOrEndUpload(); + } + else + { + manager.updateProgressStatus('COMPLETION', 0, true); + manager.nextOrEndUploadForFolder(); + } + } + else + { + childFileInfo.tempFileSize = Number(partialInfo.tempFileSize); + childFileInfo.transferedSize = childFileInfo.tempFileSize; + manager.sendPartialFileForFolder(parentFileInfo, true); + + } + } + else if (childFileInfo.xmlHttpRequest.readyState == 4 && childFileInfo.xmlHttpRequest.status >= 500) + { + clearInterval(manager.progressTimer); + manager.updateProgressStatus('FAILURE'); + manager.setUploadStatus('FAILURE'); + monitor.resetButtonStatus(); + + var keys = new Array('code', 'message', 'detailMessage'); + var values = new Array(manager.global.HTTP_STATUS_ERROR, childFileInfo.xmlHttpRequest.status.toString(), childFileInfo.xmlHttpRequest.responseText.trim()); + manager.setLastExceptionInfo(manager.utils.getJsonString(keys, values)); + manager.dispatchEvent(manager.onException); + } + }; + + childFileInfo.xmlHttpRequest.upload.addEventListener("progress", this.updateProgressForLargeFile, false); + childFileInfo.xmlHttpRequest.addEventListener("load", this.transferComplete, false); + childFileInfo.xmlHttpRequest.upload.addEventListener("error", this.transferFailed, false); + childFileInfo.xmlHttpRequest.addEventListener("abort", this.transferCanceled, false); + + childFileInfo.xmlHttpRequest.send(formData); + } + + this.setSelectedResumeMode = function (selectedResumeMode) + { + this.selectedResumeMode = selectedResumeMode; + } + + + this.setLastExceptionInfo = function (lastExceptionInfo) + { + this.lastExceptionInfo = lastExceptionInfo; + } + this.getLastExceptionInfo = function () + { + return this.lastExceptionInfo; + } + + this.updateProgress = function (event) + { + if (event.lengthComputable) + { + var fileInfo = self.getFileInfoFromMap(self.currentUploadItemIndex); + if (fileInfo.fileType == 'FOLDER') + { + fileInfo.transferedSize = self.totalUploadedFileSizeForFolder + event.loaded; + } + else + fileInfo.transferedSize = event.loaded; + } + else + { + // Unable to compute progress information since the total size is unknown + } + } + + + this.updateProgressForLargeFile = function (event) + { + if (event.lengthComputable) + { + var fileInfo = self.getFileInfoFromMap(self.currentUploadItemIndex); + if (fileInfo.fileType == 'FOLDER') + { + fileInfo.transferedSize = self.childFileInfoList[self.currentUploadItemIndexForFolder].tempFileSize + self.totalUploadedFileSizeForFolder + event.loaded; + } + else + fileInfo.transferedSize = fileInfo.tempFileSize + event.loaded; + } + else { + // Unable to compute progress information since the total size is unknown + } + } + + + + this.transferComplete = function (event) + { + //console.log("The transfer is complete."); + } + + this.transferFailed = function (event) + { + //console.log("An error occurred while transferring the file."); + //clearInterval(self.progressTimer); + //console.log(event.status); + } + + this.transferCanceled = function (evnet) + { + //console.log("The transfer has been canceled by the user."); + //clearInterval(self.progressTimer); + + var monitor = parent.fileUploadMonitor; + self.updateProgressStatus('WAIT'); + self.setUploadStatus('WAIT'); + monitor.resetButtonStatus(); + self.dispatchEvent(self.onCancelUploadItem, self.currentUploadItemIndex); + } + + this.getUploadedFilesInfo = function () + { + var i = 0; + var json = ""; + + if (this.uploadedFileInfoList.length == 0) + return '[]'; + + for (i = 0; i < this.uploadedFileInfoList.length; i++) { + json += this.uploadedFileInfoList[i] + ','; + } + + if (json.length > 0) + json = '[' + json.substring(0, json.length - 1) + ']'; + + return json; + } + + this.getModifiedFilesInfo = function () + { + var fileItem; + var i = 0; + var json = ""; + + if (this.modifiedFilesInfoList.length == 0) + return '[]'; + + for (i = 0; i < this.modifiedFilesInfoList.length; i++) { + json += this.getFileInfoToJson(this.modifiedFilesInfoList[i]) + ','; + } + + if (json.length > 0) + json = '[' + json.substring(0, json.length - 1) + ']'; + + return json; + } + + /* + this.getUploadedFileInfoAt = function (rowIndex) { + var fileItem; + var i = 0; + + if (this.uploadedFileInfoList.length < (rowIndex+1)) + return '{}'; + + return this.uploadedFileInfoList[rowIndex]; + } + */ + + + this.getFileInfoAt = function (rowIndex) + { + if (this.fileInfoMap.size < (rowIndex + 1)) + return '{}'; + + return this.getFileInfoToJson(this.getFileInfoFromMap(rowIndex)); + } + + this.getFileAt = function (rowIndex) + { + if (this.fileInfoMap.size < (rowIndex + 1)) + return null; + + var fileInfo = this.getFileInfoFromMap(rowIndex); + if (fileInfo.fileType != "NORMAL") + return null; + + return fileInfo.file; + } + + this.getFileInfoToJson = function (fileInfo) + { + var keys = new Array('fileType', 'fileId', 'fileName', 'fileSize', 'status', 'isDeleted'); + var values = new Array(fileInfo.fileType, fileInfo.fileId, fileInfo.fileName, fileInfo.fileSize, fileInfo.status, fileInfo.isDeleted); + return this.utils.getJsonString(keys, values); + } + + this.dispatchEvent = function (eventName, eventParam) + { + if (eventName == undefined || eventName == "") + return; + + if (eventParam != undefined) + setTimeout(this.utils.stringFormat(eventName + '(' + eventParam + ')'), 0); + else + setTimeout(this.utils.stringFormat(eventName + '()'), 0); + }; + + + this.setEvnetNames = function (eventNames) + { + var obj = jQuery.parseJSON(eventNames); + + this.onStartUpload = obj.onStartUpload; + this.onStartUploadItem = obj.onStartUploadItem; + this.onEndUploadItem = obj.onEndUploadItem; + this.onEndUpload = obj.onEndUpload; + this.onCloseMonitorWindow = obj.onCloseMonitorWindow; + this.onCancelUploadItem = obj.onCancelUploadItem; + this.onException = obj.onException; + this.onDblClickGridRow = obj.onDblClickGridRow; + }; + + this.getUploadStatus = function () + { + return this.uploadStatus; + }; + + this.setUploadStatus = function (uploadStatus) + { + this.uploadStatus = uploadStatus; + }; + + this.getTotalFileCount = function () + { + return this.dataGrid.getData().length; + } + + + this.addUploadedFile = function (uploadedFileInfoJsonString) + { + var uploadedFileInfo = jQuery.parseJSON(uploadedFileInfoJsonString); + var fileId = uploadedFileInfo.fileId; + var fileName = uploadedFileInfo.fileName; + var fileSize = uploadedFileInfo.fileSize; + + var dataGrid = self.dataGrid; + + var fileInfo = new __UploadFileInfo(); + fileInfo.id = this.utils.getGuid(); + fileInfo.fileId = uploadedFileInfo.fileId; + fileInfo.fileName = uploadedFileInfo.fileName; + fileInfo.fileSize = parseInt(uploadedFileInfo.fileSize); + fileInfo.transferedSize = 0; + fileInfo.fileType = 'UPLOADED'; + fileInfo.status = 'WAIT'; + var statusLabel = '대기'; + + self.fileInfoMap.set(fileInfo.id, fileInfo); + self.modifiedFilesInfoList.push(fileInfo); + + var datas = dataGrid.getData(); + datas.splice(datas.length, 0, { + 'src': '../../app/image/file_icon/' + this.utils.getFileExtension(fileInfo.fileName) + '.png', + 'title': fileName, + 'size': self.utils.convertByteUnit(fileSize), + 'status': statusLabel, + 'realSize': fileSize, + 'id' : fileInfo.id + }); + dataGrid.invalidateRow(datas.length); + dataGrid.updateRowCount(); + dataGrid.render(); + dataGrid.scrollRowIntoView(datas.length - 1) + + self.totalFileSize += fileInfo.fileSize; + self.updateStatus(); + } + + this.addFiles = function (files) + { + var dataGrid = self.dataGrid; + for (var i = 0; i < files.length; i++) { + // Check limit + if (this.checkLimit(files[i]) == false) + break; + + var fileInfo = new __UploadFileInfo(); + fileInfo.id = this.utils.getGuid(); + fileInfo.file = files[i]; + fileInfo.fileName = fileInfo.file.name; + fileInfo.fileSize = fileInfo.file.size; + fileInfo.transferedSize = 0; + fileInfo.fileType = 'NORMAL'; + fileInfo.status = 'WAIT'; + var statusLabel = '대기'; + + self.fileInfoMap.set(fileInfo.id, fileInfo); + var datas = dataGrid.getData(); + datas.splice(datas.length, 0, { + 'src': '../../app/image/file_icon/' + this.utils.getFileExtension(fileInfo.fileName) + '.png', + 'title': fileInfo.fileName, + 'size': self.utils.convertByteUnit(fileInfo.fileSize), + 'status': statusLabel, + 'realSize': fileInfo.fileSize, + 'id': fileInfo.id + }); + dataGrid.invalidateRow(datas.length); + dataGrid.updateRowCount(); + dataGrid.render(); + dataGrid.scrollRowIntoView(datas.length - 1) + + self.totalFileSize += fileInfo.fileSize; + } + }; + + this.addFilesToFolderList = function (files) + { + // Add child file list to folder map + var childFileInfoList = []; + var folderSize = 0; + var folderId = this.utils.getGuid(); + + for (var i = 0; i < files.length; i++) + { + // Check limit + if (this.checkLimit(files[i]) == false) + break; + + var fileInfo = new __UploadFileInfo(); + fileInfo.id = this.utils.getGuid(); + var filePath = files[i].webkitRelativePath; + fileInfo.file = files[i]; + fileInfo.fileDirPath = filePath.substring(0, filePath.lastIndexOf("/")); + fileInfo.fileName = filePath.substring(filePath.lastIndexOf("/") + 1); + fileInfo.fileSize = fileInfo.file.size; + fileInfo.transferedSize = 0; + fileInfo.fileType = 'NORMAL'; + fileInfo.status = 'WAIT'; + + childFileInfoList.push(fileInfo); + + folderSize += fileInfo.fileSize; + self.totalFileSize += fileInfo.fileSize; + } + self.folderInfoMap.set(folderId, childFileInfoList); + + // Add folder info to file list + var rootFolderName = files[0].webkitRelativePath; + rootFolderName = rootFolderName.substring(0, rootFolderName.indexOf("/")); + + var folderInfo = new __UploadFileInfo(); + folderInfo.id = this.utils.getGuid(); + folderInfo.folderId = folderId; + folderInfo.file = files[i]; + folderInfo.fileDirPath = ''; + folderInfo.fileName = rootFolderName; + folderInfo.fileSize = folderSize; + folderInfo.transferedSize = 0; + folderInfo.fileType = 'FOLDER'; + folderInfo.status = 'WAIT'; + var statusLabel = '대기'; + + self.fileInfoMap.set(folderInfo.id, folderInfo); + + var dataGrid = self.dataGrid; + var datas = dataGrid.getData(); + datas.splice(datas.length, 0, { + 'src': '../../app/image/file_icon/folder.png', + 'title': folderInfo.fileName, + 'size': self.utils.convertByteUnit(folderInfo.fileSize), + 'status': statusLabel, + 'realSize': fileInfo.fileSize, + 'id': folderInfo.id + }); + dataGrid.invalidateRow(datas.length); + dataGrid.updateRowCount(); + dataGrid.render(); + dataGrid.scrollRowIntoView(datas.length - 1) + }; + + this.onFileSelect = function (event) + { + self.addFiles(event.target.files); + self.updateStatus(); + + // 연속된 동일파일 선택에 대한 예외처리 + this.value = ""; + }; + + this.onFolderSelect = function (event) + { + self.addFilesToFolderList(event.target.files); + self.updateStatus(); + + // 연속된 동일파일 선택에 대한 예외처리 + this.value = ""; + }; + this.setFileFilter = function (fileFilterInfo) + { + if (fileFilterInfo == undefined || fileFilterInfo == '') + return; + $('#' + this.fileButton).prop('accept', fileFilterInfo); + }; + + this.setAllowedFileExtension = function (allowedExtension, fileExtensionCheckMode) + { + this.allowedFileExtensionList = allowedExtension.toLowerCase().split(';'); + this.fileExtensionCheckMode = fileExtensionCheckMode; + }; + + this.setMaxFileCount = function (maxFileCount) + { + if (maxFileCount <= 0) + maxFileCount = -1; + + this.maxFileCount = maxFileCount; + }; + + this.setMaxTotalFileSize = function (maxTotalFileSize) + { + if (maxTotalFileSize <= 0) + maxTotalFileSize = -1; + + this.maxTotalFileSize = maxTotalFileSize; + }; + + this.setMaxFileSize = function (maxFileSize) + { + if ((this.uploadMode == "LARGE" || this.uploadMode == "RESUME") && maxFileSize <= 0) + maxFileSize = -1; + else if (maxFileSize <= 0 || maxFileSize > this.global.MAX_FILE_SIZE) + maxFileSize = this.global.MAX_FILE_SIZE; + + this.maxFileSize = maxFileSize; + }; + + this.setUploadMode = function (uploadMode) + { + this.uploadMode = uploadMode; + }; + + this.setFileGroupId = function (fileGroupId) + { + this.fileGroupId = fileGroupId; + }; + + + this.checkLimit = function (file) + { + var isValid = true; + var keys = null; + var values = null; + + if (this.allowedFileExtensionList.length > 0) { + // Check extension + var ext = ''; + var index = file.name.lastIndexOf('.'); + if (index != -1) { + ext = file.name.substring(index + 1); + ext = ext.toLowerCase(); + } + + // 허용된 확장자 검사 + if (this.fileExtensionCheckMode == 'FORWARD') { + isValid = false; + for (var i = 0; i < this.allowedFileExtensionList.length; i++) { + if (this.allowedFileExtensionList[i] == ext) { + isValid = true; + break; + } + } + if (isValid == false) { + keys = new Array('code', 'message', 'detailMessage'); + values = new Array(this.global.ALLOWED_EXTENSION_ERROR, + this.utils.stringFormat('({0}) 파일은 전송이 제한된 파일 확장자입니다.', file.name), ''); + } + } + // 허용되지 않은 확장자 검사 + else { + isValid = true; + for (var i = 0; i < this.allowedFileExtensionList.length; i++) { + if (this.allowedFileExtensionList[i] == ext) { + isValid = false; + break; + } + } + if (isValid == false) { + keys = new Array('code', 'message', 'detailMessage'); + values = new Array(this.global.ALLOWED_EXTENSION_ERROR, + this.utils.stringFormat('({0}) 파일은 전송이 제한된 파일 확장자입니다.', file.name), ''); + } + } + } + + if (isValid == true) { + // Check max file count + if (this.maxFileCount != -1 && this.maxFileCount < this.fileInfoMap.size + 1) { + keys = new Array('code', 'message', 'detailMessage'); + values = new Array(this.global.MAX_FILE_COUNT_ERROR, + this.utils.stringFormat('전송할 수 있는 파일 개수는 {0} 입니다.', this.utils.numberFormat(this.maxFileCount, 0)), ''); + + isValid = false; + } + // Check max file size + else if (this.maxFileSize != -1 && this.maxFileSize < file.size) { + keys = new Array('code', 'message', 'detailMessage'); + values = new Array(this.global.MAX_FILE_SIZE_ERROR, + this.utils.stringFormat('{0}보다 큰 파일({1})은 전송할 수 없습니다.', this.utils.numberFormat(this.maxFileSize, 0), file.name), ''); + + isValid = false; + } + // Check max total file size + else if (this.maxTotalFileSize != -1 && this.maxTotalFileSize < this.totalFileSize + file.size) { + keys = new Array('code', 'message', 'detailMessage'); + values = new Array(this.global.MAX_FILE_COUNT_ERROR, + this.utils.stringFormat('전송할 수 있는 전체 파일의 크기는 {0}입니다.', this.utils.numberFormat(this.maxTotalFileSize, 0)), ''); + + isValid = false; + } + } + + if (isValid == false) { + this.setLastExceptionInfo(this.utils.getJsonString(keys, values)); + this.dispatchEvent(this.onException); + } + + return isValid; + }; + + this.initFilesInfo = function () + { + if (this.getUploadStatus() == "TRANSFERRING") + return; + + // 파일 정보 초기화 + for (var i = 0; i < this.dataGrid.getData().length; i++) + { + var id = this.dataGrid.getDataItem(i)["id"]; + var fileInfo = this.fileInfoMap.get(id); + + fileInfo.status = "WAIT"; + fileInfo.transferedSize = 0; + + if(fileInfo.fileType == 'FOLDER') + { + var childFileInfoList = this.folderInfoMap.get(id); + for (var ci = 0; ci < childFileInfoList.length; ci++) + { + var childFileInfo = childFileInfoList[ci]; + childFileInfo.status = "WAIT"; + childFileInfo.transferedSize = 0; + } + } + + this.dataGrid.getDataItem(i)["status"] = "대기"; + this.dataGrid.updateCell(i, 2) + } + + this.dataGrid.render(); + + this.uploadedFileInfoList = []; + this.modifiedFilesInfoList = []; + + // 예외처리 정보 초기화 + this.setLastExceptionInfo('') + }; + + this.getFileInfoFromMap = function (gridRowIndex) + { + var id = this.dataGrid.getDataItem(gridRowIndex)["id"]; + return this.fileInfoMap.get(id); + }; + + this.deleteFileInfoFromMap = function (gridRowIndex) + { + var id = this.dataGrid.getDataItem(gridRowIndex)["id"]; + this.fileInfoMap.delete(id); + }; + + this.numericSorter = function (a, b) + { + var x = a[self.currentSortCol], y = b[self.currentSortCol]; + return self.isAsc * (x == y ? 0 : (x > y ? 1 : -1)); + }; + + this.sizeSorter = function (a, b) + { + var x = a["realSize"], y = b["realSize"]; + return self.isAsc * (x == y ? 0 : (x > y ? 1 : -1)); + }; + + /* + this.ratingSorter = function(a, b) + { + var xrow = a[self.currentSortCol], yrow = b[self.currentSortCol]; + console.log(xrow); + var x = xrow[3], y = yrow[3]; + console.log(x); + return self.isAsc * (x == y ? 0 : (x > y ? 1 : -1)); + } + */ + + this.moveFirstLocation = function () + { + var grid = self.dataGrid; + var dataList = grid.getData(); + var selectedRows = grid.getSelectedRows(); + + if (selectedRows.length > 0) + { + var index = selectedRows[selectedRows.length - 1]; + if (index == 0) + return; + + var rowToInsert = dataList.splice(index, 1); + dataList.splice(0, 0, rowToInsert[0]); + grid.setSelectedRows([]); + grid.resetActiveCell(); + var itemArray = [0]; + grid.setSelectedRows(itemArray); + grid.scrollRowIntoView(0); + + grid.invalidate(); + grid.updateRowCount(); + grid.render(); + } + }; + + this.movePrevLocation = function () + { + var grid = self.dataGrid; + var dataList = grid.getData(); + var selectedRows = grid.getSelectedRows(); + + if (selectedRows.length > 0) + { + var index = selectedRows[selectedRows.length - 1]; + if (index == 0) + return; + + var rowToInsert = dataList.splice(index, 1); + dataList.splice(index - 1, 0, rowToInsert[0]); + grid.setSelectedRows([]); + grid.resetActiveCell(); + var itemArray = [index - 1]; + grid.setSelectedRows(itemArray); + grid.scrollRowIntoView(index - 1); + + grid.invalidate(); + grid.updateRowCount(); + grid.render(); + } + }; + + this.moveNextLocation = function () + { + var grid = self.dataGrid; + var dataList = grid.getData(); + var selectedRows = grid.getSelectedRows(); + + if (selectedRows.length > 0) + { + var index = selectedRows[selectedRows.length - 1]; + if (index == dataList.length - 1) + return; + + var rowToInsert = dataList.splice(index, 1); + dataList.splice(index + 1, 0, rowToInsert[0]); + grid.setSelectedRows([]); + grid.resetActiveCell(); + var itemArray = [index + 1]; + grid.setSelectedRows(itemArray); + grid.scrollRowIntoView(index + 1); + + grid.invalidate(); + grid.updateRowCount(); + grid.render(); + } + }; + + this.moveLastLocation = function () + { + var grid = self.dataGrid; + var dataList = grid.getData(); + var selectedRows = grid.getSelectedRows(); + + if (selectedRows.length > 0) + { + var index = selectedRows[selectedRows.length - 1]; + if (index == dataList.length - 1) + return; + + var rowToInsert = dataList.splice(index, 1); + dataList.splice(dataList.length, 0, rowToInsert[0]); + grid.setSelectedRows([]); + grid.resetActiveCell(); + var itemArray = [dataList.length - 1]; + grid.setSelectedRows(itemArray); + grid.scrollRowIntoView(dataList.length - 1); + + grid.invalidate(); + grid.updateRowCount(); + grid.render(); + } + }; +}; + +var __FileUploadMonitor = function (_parent) +{ + var parent = _parent; + var self = this; + this.utils = new __NamoCrossUploaderUtils(); + + this.backgroundPanel = this.utils.getGuid(); + this.mainPanel = this.utils.getGuid(); + + this.titlePanel = this.utils.getGuid(); + this.titleLabel = this.utils.getGuid(); + + this.progressPanel = this.utils.getGuid(); + this.totalUploadedFileSizeLabel = this.utils.getGuid(); + this.totalFileSizeLabel = this.utils.getGuid(); + this.transferSpeedLabel = this.utils.getGuid(); + this.totalUploadedPercentLabel = this.utils.getGuid(); + this.remainingTimeLabel = this.utils.getGuid(); + this.remainingTimeUnitLabel = this.utils.getGuid(); + this.progressBar = this.utils.getGuid(); + + this.monitorDataGrid = this.utils.getGuid(); + + this.buttonPanel = this.utils.getGuid(); + this.closeCheckBox = this.utils.getGuid(); + this.transferButton = this.utils.getGuid(); + this.closeButton = this.utils.getGuid(); + + // resume option dlg + this.roBackgroundPanel = ""; + this.roMainPanel = ""; + this.roTitlePanel = ""; + this.roTitleLabel = ""; + this.roFileInfoPanel = ""; + this.roExistedUploadInfoLabel_01 = ""; + this.roExistedUploadInfoLabel_02 = ""; + this.roExistedUploadInfoLabel_03 = ""; + this.roPreviewImage = ""; + this.roTotalFileSizeTitle = ""; + this.roTotalFileSizeValue = ""; + this.roTransferedFileSizeTitle = ""; + this.roTransferedFileSizeValue = ""; + this.roRemainedFileSizeTitle = ""; + this.roRemainedFileSizeValue = ""; + this.roLastModifiedDateTitle = ""; + this.roLastModifiedDateValue = ""; + this.roApplyAllFilesCheckBox = ""; + this.roApplyAllFilesDesc = ""; + this.roResumeUploadButton = ""; + this.roReUploadButton = ""; + + + this.width = 610; + this.height = 358; + this.defaultMargin = 4; + this.leftMargin = 16; + this.rightMargin = 16; + this.topMargin = 4; + this.titlePanelHeight = 33; + this.progressPanelHeight = 58; + this.progressBarHeight = 17; + this.dataGridHeight = 207; // 213 + this.buttonPanelHeight = 33; + + this.dataGrid; + + this.fontFamily = "Malgun Gothic"; + this.monitorLayerClass = ""; + this.monitorBgLayerClass = ""; + this.resumeOptionLayerClass = ""; + this.resumeOptionBgLayerClass = ""; + + this.uploadMode = "BASIC"; + + this.create = function (properties, uploadMode) + { + var obj = jQuery.parseJSON(properties); + this.monitorLayerClass = obj.monitorLayerClass; + this.monitorBgLayerClass = obj.monitorBgLayerClass; + + if (obj.resumeOptionLayerClass != undefined && obj.resumeOptionLayerClass != "" && + obj.resumeOptionBgLayerClass != undefined && obj.resumeOptionBgLayerClass != "") + { + this.resumeOptionLayerClass = obj.resumeOptionLayerClass; + this.resumeOptionBgLayerClass = obj.resumeOptionBgLayerClass; + } + + if (uploadMode != undefined && uploadMode != "") + this.uploadMode = uploadMode; + + this.createControls(); + this.setEventHandler(); + this.setCloseMonitorCheckBoxStatus(obj.closeMonitorCheckBoxChecked) + }; + + this.setProperties = function (properties) + { + if (properties == undefined) + return; + + this.resetProperties(properties); + }; + + + this.resetProperties = function (properties) + { + if (properties == undefined) + return; + + var obj = jQuery.parseJSON(properties); + + if (obj.closeMonitorCheckBoxChecked != undefined) + this.setCloseMonitorCheckBoxStatus(obj.closeMonitorCheckBoxChecked); + }; + + this.createControls = function () + { + this.createMonitorDlg(); + + if (this.uploadMode == "RESUME") + this.createResumeOptionDlg(); + }; + + + this.createMonitorDlg = function () + { + // Background Panel + $('body').append(this.utils.stringFormat('', + this.backgroundPanel, this.monitorBgLayerClass)); + + // Main Panel + $('body').append(this.utils.stringFormat('', + this.mainPanel, this.width, this.height, this.monitorLayerClass)); + + // Title Panel + $('#' + this.mainPanel).append(this.utils.stringFormat('
', + this.titlePanel, this.width, this.titlePanelHeight)); + $('#' + this.titlePanel).append(this.utils.stringFormat('파일 업로드', + this.titleLabel, this.leftMargin, this.topMargin * 2, this.fontFamily)); + + // Progressbar Panel + $('#' + this.mainPanel).append(this.utils.stringFormat('
', + this.progressPanel, this.width, this.progressPanelHeight)); + $('#' + this.progressPanel).append(this.utils.stringFormat('0.00B', + this.totalUploadedFileSizeLabel, this.leftMargin, 14, this.fontFamily)); + $('#' + this.progressPanel).append(this.utils.stringFormat('/0.00B', + this.totalFileSizeLabel, 0, 14, this.fontFamily)); + $('#' + this.progressPanel).append(this.utils.stringFormat('(0/sec)', + this.transferSpeedLabel, 0, 14, this.fontFamily)); + var totalUploadedPercentLeft = (this.width / 2) - ($('#' + this.totalUploadedPercentLabel).width() / 2); + $('#' + this.progressPanel).append(this.utils.stringFormat('0%', + this.totalUploadedPercentLabel, 0, this.topMargin, totalUploadedPercentLeft, this.fontFamily)); + $('#' + this.progressPanel).append(this.utils.stringFormat('초 남음', + this.remainingTimeUnitLabel, this.rightMargin, 14, this.fontFamily)); + $('#' + this.progressPanel).append(this.utils.stringFormat('0', + this.remainingTimeLabel, 2, 14)); + var progressBarWidth = this.width - (this.leftMargin + this.rightMargin); + $('#' + this.progressPanel).append(this.utils.stringFormat('
', + this.progressBar, progressBarWidth, this.progressBarHeight, this.leftMargin)); + + // DataGrid + var dataGridWidth = progressBarWidth; + $('#' + this.mainPanel).append(this.utils.stringFormat('
', + this.monitorDataGrid, dataGridWidth, this.dataGridHeight, this.leftMargin)); + + var gridWidth = this.width - (this.leftMargin + this.rightMargin); + var fieldWidth = 100; + var grid; + var columns = [ + { + id: "title", name: "파일이름", field: "title", width: gridWidth - (fieldWidth * 2), + formatter: function (args) + { + //return " " + data[args].title + "" + return " " + data[args].title + "" + } + }, + { id: "size", name: "크기", field: "size", width: fieldWidth, cssClass: "slick-grid-filesize" }, + { id: "status", name: "상태", field: "status", width: fieldWidth, cssClass: "slick-grid-transfer-status" } + ]; + + var options = { + enableCellNavigation: true, + enableColumnReorder: false, + editable: true, + enableCellNavigation: true, + forceFitColumns: true, + autoEdit: false + }; + + var data = []; + this.dataGrid = new Slick.Grid("#" + this.monitorDataGrid, data, columns, options); + this.dataGrid.setSelectionModel(new Slick.RowSelectionModel({ selectActiveRow: true })); + //$(function () { + //}); + + // Button panel + $('#' + this.mainPanel).append(this.utils.stringFormat('
', + this.buttonPanel, this.width, this.buttonPanelHeight)); + $('#' + this.buttonPanel).append(this.utils.stringFormat('', + this.closeCheckBox, this.leftMargin, 24)); + $('#' + this.buttonPanel).append(this.utils.stringFormat('전송이 완료되면 창을 종료합니다.', + 2, 0, this.fontFamily)); + $('#' + this.buttonPanel).append(this.utils.stringFormat('', + this.closeButton, this.rightMargin, 15, this.fontFamily)); + $('#' + this.buttonPanel).append(this.utils.stringFormat('', + this.transferButton, this.defaultMargin, 15, this.fontFamily)); + }; + + this.createResumeOptionDlg = function () + { + this.roBackgroundPanel = this.utils.getGuid(); + this.roMainPanel = this.utils.getGuid(); + this.roTitlePanel = this.utils.getGuid(); + this.roTitleLabel = this.utils.getGuid(); + this.roFileInfoPanel = this.utils.getGuid(); + this.roExistedUploadInfoLabel_01 = this.utils.getGuid(); + this.roExistedUploadInfoLabel_02 = this.utils.getGuid(); + this.roExistedUploadInfoLabel_03 = this.utils.getGuid(); + this.roPreviewImage = this.utils.getGuid(); + this.roTotalFileSizeTitle = this.utils.getGuid(); + this.roTotalFileSizeValue = this.utils.getGuid(); + this.roTransferedFileSizeTitle = this.utils.getGuid(); + this.roTransferedFileSizeValue = this.utils.getGuid(); + this.roRemainedFileSizeTitle = this.utils.getGuid(); + this.roRemainedFileSizeValue = this.utils.getGuid(); + this.roLastModifiedDateTitle = this.utils.getGuid(); + this.roLastModifiedDateValue = this.utils.getGuid(); + this.roApplyAllFilesCheckBox = this.utils.getGuid(); + this.roApplyAllFilesDesc = this.utils.getGuid(); + this.roResumeUploadButton = this.utils.getGuid(); + this.roReUploadButton = this.utils.getGuid(); + + $('body').append(this.utils.stringFormat('', this.roBackgroundPanel, this.resumeOptionBgLayerClass)); + + $('body').append(this.utils.stringFormat('', + this.roMainPanel, this.fontFamily, this.resumeOptionLayerClass, this.roTitlePanel, this.roTitleLabel, this.roFileInfoPanel, + this.roExistedUploadInfoLabel_01, this.roExistedUploadInfoLabel_02, this.roExistedUploadInfoLabel_03, + this.roPreviewImage, this.roTotalFileSizeTitle, this.roTotalFileSizeValue, this.roTransferedFileSizeTitle, this.roTransferedFileSizeValue, + this.roRemainedFileSizeTitle, this.roRemainedFileSizeValue, + this.roLastModifiedDateTitle, this.roLastModifiedDateValue, this.roApplyAllFilesCheckBox, this.roApplyAllFilesDesc, this.roResumeUploadButton, this.roReUploadButton)); + } + + this.addFiles = function () + { + var manager = parent.fileUploadManager; + + for (var i = 0; i < manager.dataGrid.getData().length; i++) + { + var fileInfo = manager.getFileInfoFromMap(i); + + var statusLabel = ""; + if (fileInfo.status == "COMPLETION") + statusLabel = "완료"; + else if (fileInfo.status == "CANCELLATION") + statusLabel = "취소"; + else if (fileInfo.status == "FAILURE") { + statusLabel = "실패"; + } + else if (fileInfo.status == "TRANSFERRING") + statusLabel = this.utils.convertByteUnit(fileInfo.transferedSize); + else + statusLabel = "대기"; + + var fileIconUrl = ''; + if (fileInfo.fileType == 'FOLDER') + fileIconUrl = '../../app/image/file_icon/folder.png'; + else + fileIconUrl = '../../app/image/file_icon/' + this.utils.getFileExtension(fileInfo.fileName) + '.png'; + + var datas = this.dataGrid.getData(); + datas.splice(datas.length, 0, { + 'src': fileIconUrl, + "title": fileInfo.fileName, + "size": this.utils.convertByteUnit(fileInfo.fileSize), + "status": statusLabel + }); + this.dataGrid.invalidateRow(datas.length); + this.dataGrid.updateRowCount(); + this.dataGrid.render(); + this.dataGrid.scrollRowIntoView(datas.length - 1) + } + }; + + this.openResumeOptionDlg = function (fileInfo) + { + $('#' + this.roExistedUploadInfoLabel_01).text(fileInfo.fileName); + $('#' + this.roPreviewImage).attr('src', '../../app/image/file_icon/' + this.utils.getFileExtension(fileInfo.fileName) + '.png'); + $('#' + this.roTotalFileSizeValue).text(this.utils.convertByteUnit(fileInfo.fileSize)); + $('#' + this.roTransferedFileSizeValue).text(this.utils.convertByteUnit(fileInfo.tempFileSize)); + $('#' + this.roRemainedFileSizeValue).text(this.utils.convertByteUnit(fileInfo.fileSize - fileInfo.tempFileSize)); + $('#' + this.roLastModifiedDateValue).text(fileInfo.tempFileUpdatedDate); + + $('#' + this.roBackgroundPanel).css('display', 'block'); + $('#' + this.roMainPanel).css('display', 'block'); + }; + + this.closeResumeOptionDlg = function () + { + $('#' + this.roBackgroundPanel).css('display', 'none'); + $('#' + this.roMainPanel).css('display', 'none'); + }; + + this.open = function () + { + $('#' + this.backgroundPanel).css('display', 'block'); + $('#' + this.mainPanel).css('display', 'block'); + }; + + this.close = function () + { + $('#' + this.backgroundPanel).css('display', 'none'); + $('#' + this.mainPanel).css('display', 'none'); + }; + + this.deleteAllGridFiles = function () + { + var grid = this.dataGrid; + var dataList = grid.getData(); + + while (dataList.length > 0) { + var currentRow = dataList.length - 1; + dataList.splice(currentRow, 1); + var r = currentRow; + while (r < dataList.length) { + grid.invalidateRow(r); + r++; + } + grid.updateRowCount(); + grid.render(); + grid.scrollRowIntoView(currentRow - 1) + } + }; + + this.clear = function () + { + // Title + $('#' + this.titleLabel).text('파일 업로드'); + + // Grid + this.deleteAllGridFiles(); + + // Total uploaded file size + $('#' + this.totalUploadedFileSizeLabel).text('0.00B'); + $('#' + this.totalFileSizeLabel).text('/0.00B'); + + // Upload speed + $('#' + this.transferSpeedLabel).text('(0.00B/sec)'); + + // Remaining time + $('#' + this.remainingTimeLabel).text('0'); + + // Percent + $('#' + this.totalUploadedPercentLabel).text('0%'); + + // 프로그래스바 + $('#' + this.progressBar).val(0); + } + + this.setEventHandler = function () + { + $('#' + this.closeButton).bind("click", this.onClickCloseButton); + $('#' + this.transferButton).bind("click", this.onClickTransferButton); + + // resume + $('#' + this.roResumeUploadButton).bind("click", this.onClickResumeUploadFileButton); + $('#' + this.roReUploadButton).bind("click", this.onClickReUploadFileButton); + + }; + + this.onClickTransferButton = function () + { + var manager = parent.fileUploadManager; + var monitor = self; + + var uploadStatus = manager.uploadStatus; + + if (uploadStatus == 'WAIT') { + manager.startTime = new Date().getTime(); + manager.progressTimer = setInterval(manager.startProgressTimer, 500); + + manager.totalUploadedFileSize = 0; + manager.setUploadStatus('TRANSFERRING'); + monitor.resetButtonStatus(); + manager.dispatchEvent(manager.onStartUpload); + + //manager.sendFormData(); + + if (manager.uploadMode == "BASIC") + setTimeout(manager.sendFormData(), 0); + else + setTimeout(manager.sendLargeFormData(), 0); + } + else if (uploadStatus == 'TRANSFERRING') + { + var fileInfo = manager.getFileInfoFromMap(manager.currentUploadItemIndex); + if (fileInfo.fileType == 'FOLDER') + manager.childFileInfoList[manager.currentUploadItemIndexForFolder].xmlHttpRequest.abort(); + else + fileInfo.xmlHttpRequest.abort(); + + clearInterval(manager.progressTimer); + + /* + manager.updateProgressStatus('WAIT'); + manager.setUploadStatus('WAIT'); + monitor.resetButtonStatus(); + manager.dispatchEvent(manager.onCancelUploadItem, manager.currentUploadItemIndex); + */ + } + }; + + //// + // private + this.onClickResumeUploadFileButton = function () + { + self.closeResumeOptionDlg(); + + var manager = parent.fileUploadManager; + manager.setSelectedResumeMode("ADD"); + + var fileInfo = manager.getFileInfoFromMap(manager.currentUploadItemIndex); + + if (fileInfo.fileType == 'FOLDER') + manager.sendPartialFileForFolder(fileInfo, true); + else + manager.sendPartialFile(true); + }; + + this.onClickReUploadFileButton = function () { + self.closeResumeOptionDlg(); + + var manager = parent.fileUploadManager; + manager.setSelectedResumeMode("NEW"); + + var fileInfo = manager.getFileInfoFromMap(manager.currentUploadItemIndex); + + if (fileInfo.fileType == 'FOLDER') + manager.sendPartialFileForFolder(fileInfo, false); + else + manager.sendPartialFile(false); + + //manager.sendPartialFile(false); + }; + + this.resetButtonStatus = function () + { + var uploadStatus = parent.fileUploadManager.uploadStatus; + + if (uploadStatus == 'WAIT') + { + $('#' + this.transferButton).prop('value', '전송'); + $('#' + this.closeButton).prop('value', '닫기'); + + $('#' + this.transferButton).prop('disabled', false); + $('#' + this.closeButton).prop('disabled', false); + } + else if (uploadStatus == 'TRANSFERRING') + { + $('#' + this.transferButton).prop('value', '취소'); + $('#' + this.closeButton).prop('value', '닫기'); + + $('#' + this.transferButton).prop('disabled', false); + $('#' + this.closeButton).prop('disabled', true); + } + else + { // COMPLETION, FAILURE, CANCELLATION + $('#' + this.transferButton).prop('value', '전송'); + $('#' + this.closeButton).prop('value', '닫기'); + + $('#' + this.transferButton).prop('disabled', true); + $('#' + this.closeButton).prop('disabled', false); + } + }; + + this.getCloseMonitorCheckBoxStatus = function () + { + return $('#' + this.closeCheckBox).prop('checked'); + }; + + this.setCloseMonitorCheckBoxStatus = function (checked) + { + $('#' + this.closeCheckBox).prop('checked', checked); + }; + + this.onClickCloseButton = function () + { + var manager = parent.fileUploadManager; + + var fileInfo = manager.getFileInfoFromMap(manager.currentUploadItemIndex); + + if (fileInfo.fileType == 'FOLDER') + manager.childFileInfoList[manager.currentUploadItemIndexForFolder].xmlHttpRequest.abort(); + else + fileInfo.xmlHttpRequest.abort(); + + clearInterval(manager.progressTimer); + manager.updateProgressStatus('WAIT'); + manager.setUploadStatus('WAIT'); + self.resetButtonStatus(); + + self.close(); + manager.dispatchEvent(parent.fileUploadManager.onCloseMonitorWindow); + }; + + this.getApplyAllFilesCheckBoxStatus = function () { + return $('#' + this.roApplyAllFilesCheckBox).prop('checked'); + }; + + this.getFileInfoFromMap = function (gridRowIndex) + { + var id = this.dataGrid.getDataItem(gridRowIndex)["id"]; + return this.fileInfoMap.get(id); + } + + this.deleteFileInfoFromMap = function (gridRowIndex) + { + var id = this.dataGrid.getDataItem(gridRowIndex)["id"]; + this.fileInfoMap.delete(id); + } +}; + +var __MultipleFileDownloadManager = function () +{ + var self = this; + this.utils = new __NamoCrossUploaderUtils(); + this.global = new __Global(); + this.containerId = ""; + + this.mainPanel = this.utils.getGuid(); + + this.downloadLink = this.utils.getGuid(); + this.topDummyPanel = this.utils.getGuid(); + this.managerDataGrid = this.utils.getGuid(); + + this.statusPanel = this.utils.getGuid(); + this.statusLabel = this.utils.getGuid(); + + this.buttonPanel = this.utils.getGuid(); + this.selectAllButton = this.utils.getGuid(); + this.downloadButton = this.utils.getGuid(); + this.downloadButtonOnStatus = this.utils.getGuid(); + this.downloadAllButtonOnStatus = this.utils.getGuid(); + + this.width = 0; + this.height = 0; + this.buttonPanelHeight = 40; + this.buttonWidth = 92; + this.buttonHeight = 30; + this.topDummyPanelHeight = 10; + this.statusPanelHeight = 28; + this.statusHeight = 20; + this.downloadButtonHeightOnStatus = 20; + this.downloadButtonWidthOnStatus = 60; + this.statusLabelHeight = 20; + + this.defaultMargin = 4; + this.leftMargin = 10; + this.rightMargin = 10; + this.topMargin = 5; + + this.fileInfoMap = new Map(); + this.totalFileSize = 0; + + this.dataGrid; + + this.fontFamily = "Malgun Gothic"; + this.downloadUrl = ''; + + this.isAsc = true; + this.currentSortCol = ""; + + this.create = function (properties) + { + + this.setProperties(properties); + //this.createControls(); + this.setEventHandler(); + //this.setLastExceptionInfo(''); + }; + + this.setProperties = function (properties) + { + /* + var obj = jQuery.parseJSON(properties); + + if (obj.width.lastIndexOf("%") != -1) + this.width = Math.round(this.utils.getPxFromPercent(obj.containerId, "WIDTH") / 100 * this.utils.getDigitString(obj.width)); + else + this.width = this.utils.getDigitString(obj.width); + + if (obj.height.lastIndexOf("%") != -1) + this.height = Math.round(this.utils.getPxFromPercent(obj.containerId, "HEIGHT") / 100 * this.utils.getDigitString(obj.height)); + else + this.height = this.utils.getDigitString(obj.height); + this.containerId = obj.containerId; + this.downloadUrl = obj.downloadUrl; + */ + + if (properties == undefined) + return; + + var obj = jQuery.parseJSON(properties); + + this.containerId = obj.containerId; + + this.createControls(); + + this.resetProperties(properties); + }; + + this.resetProperties = function (properties) + { + if (properties == undefined) + return; + + var obj = jQuery.parseJSON(properties); + + var data = this.dataGrid.getColumns(); + data[1].sortable = obj.sortable == undefined ? false : obj.sortable; + data[2].sortable = obj.sortable == undefined ? false : obj.sortable; + this.dataGrid.setColumns(data); + + this.downloadUrl = obj.downloadUrl; + + if (obj.width != undefined) { + if (obj.width.lastIndexOf("%") != -1) + this.width = Math.round(this.utils.getPxFromPercent(this.containerId, "WIDTH") / 100 * this.utils.getDigitString(obj.width)); + else + this.width = this.utils.getDigitString(obj.width); + $('#' + this.mainPanel).css('width', this.width + 'px'); + } + if (obj.height != undefined) { + if (obj.height.lastIndexOf("%") != -1) + this.height = Math.round(this.utils.getPxFromPercent(this.containerId, "HEIGHT") / 100 * this.utils.getDigitString(obj.height)); + else + this.height = this.utils.getDigitString(obj.height); + $('#' + this.mainPanel).css('height', this.height + 'px'); + } + if (obj.borderColor != undefined) { + $('#' + this.mainPanel).css('border-color', obj.borderColor); + } + if (obj.bottomPanelDisplayStyle != undefined) { + $('#' + this.buttonPanel).css('display', obj.bottomPanelDisplayStyle); + } + + if (obj.downloadButtonDisplayStyle != undefined) + obj.downloadButtonDisplayStyle == 'block' ? $('#' + this.downloadButton).show() : $('#' + this.downloadButton).hide(); + if (obj.downloadButtonDisabledStyle != undefined) + $('#' + this.downloadButton).prop('disabled', obj.downloadButtonDisabledStyle); + + if (obj.downloadButtonDisplayStyle != undefined && obj.downloadButtonDisplayStyle == 'none') + $('#' + this.buttonPanel).css('display', 'none'); + + if (obj.downloadButtonDisplayStyleOnStatus != undefined) + obj.downloadButtonDisplayStyleOnStatus == 'block' ? $('#' + this.downloadButtonOnStatus).show() : $('#' + this.downloadButtonOnStatus).hide(); + + if (obj.downloadAllButtonDisplayStyleOnStatus != undefined) + obj.downloadAllButtonDisplayStyleOnStatus == 'block' ? $('#' + this.downloadAllButtonOnStatus).show() : $('#' + this.downloadAllButtonOnStatus).hide(); + + + // 크기, 위치 변경 + $('#' + this.buttonPanel).css('width', this.width + 'px'); + + var dataGridWidth = this.width - (this.leftMargin + this.rightMargin); + var dataGridHeight = 0; + if ($('#' + this.buttonPanel).css('display') == 'block') { + dataGridHeight = this.height - (this.topDummyPanelHeight + this.statusPanelHeight + this.buttonPanelHeight); + } + if ($('#' + this.buttonPanel).css('display') == 'none') { + dataGridHeight = this.height - (this.topDummyPanelHeight + this.statusPanelHeight + (this.topMargin * 2)); + } + $('#' + this.managerDataGrid).css('width', dataGridWidth + 'px'); + $('#' + this.managerDataGrid).css('height', dataGridHeight + 'px'); + self.dataGrid.width = dataGridWidth; + self.dataGrid.height = dataGridHeight; + var columns = self.dataGrid.getColumns(); + columns[1].width = dataGridWidth - 100; + columns[2].width = 100; + self.dataGrid.setColumns(columns); + + $('#' + this.statusPanel).css('width', dataGridWidth + 'px'); + }; + + this.createControls = function () + { + // Main panel + $('#' + this.containerId).append(this.utils.stringFormat('
', + this.mainPanel, this.width, this.height)); + + // Download a tag + $('#' + this.mainPanel).append(this.utils.stringFormat('', this.downloadLink)); + + // Top dummy panel + $('#' + this.mainPanel).append(this.utils.stringFormat('
', + this.topDummyPanel, this.width, this.topDummyPanelHeight, 0, 0)); + + // DataGrid + var dataGridWidth = this.width - (this.leftMargin + this.rightMargin); + var dataGridHeight = this.height - (this.topDummyPanelHeight + this.statusPanelHeight + this.buttonPanelHeight); + $('#' + this.mainPanel).append(this.utils.stringFormat('
', + this.managerDataGrid, dataGridWidth, dataGridHeight, this.leftMargin, 0)); + + var gridWidth = this.width - (this.leftMargin + this.rightMargin); + var fieldWidth = 100; + var grid; + + var checkboxSelector = new Slick.CheckboxSelectColumn({ + cssClass: "slick-cell-checkboxsel", + toolTip: "전체선택/전체해제" + }); + + var columns = []; + columns.push(checkboxSelector.getColumnDefinition()); + columns.push({ + id: "title", name: "파일이름", field: "title", width: gridWidth - fieldWidth, sortable: false, sorter: this.numericSorter, + formatter: function (args) + { + //return " " + data[args].title + "" + return " " + data[args].title + "" + } + }); + columns.push({ id: "size", name: "크기", field: "size", width: fieldWidth, cssClass: "slick-grid-filesize", sortable: false, sorter: this.sizeSorter }); + + var options = { + enableCellNavigation: true, + enableColumnReorder: false, + editable: true, + enableCellNavigation: true, + forceFitColumns: true, + autoEdit: false + }; + + var data = []; + //self.dataGrid = new Slick.Grid("#" + self.managerDataGrid, data, columns, options); + + var dataView = new Slick.Data.DataView(); + dataView.setItems(data); + self.dataGrid = new Slick.Grid("#" + self.managerDataGrid, dataView.getItems(), columns, options); + + self.dataGrid.setSelectionModel(new Slick.RowSelectionModel({ selectActiveRow: true})); + self.dataGrid.registerPlugin(checkboxSelector); + self.dataGrid.onSort.subscribe(function (e, args) + { + self.dataGrid.setSelectedRows([]); + self.dataGrid.resetActiveCell(); + + self.currentSortCol = args.sortCol.field; + self.isAsc = args.sortAsc ? 1 : -1; + + dataView.sort(args.sortCol.sorter, self.isAsc); + args.grid.invalidateAllRows(); + args.grid.render(); + }); + + //var columnpicker = new Slick.Controls.ColumnPicker(columns, grid, options); + //$(function () { + //}); + + // Status panel + var statusPanelWidth = dataGridWidth; + $('#' + this.mainPanel).append(this.utils.stringFormat('
', + this.statusPanel, statusPanelWidth, this.statusPanelHeight, this.leftMargin)); + + $('#' + this.statusPanel).append(this.utils.stringFormat('', + this.downloadButtonOnStatus, this.downloadButtonWidthOnStatus, this.downloadButtonHeightOnStatus, 0, this.defaultMargin, this.fontFamily)); + + $('#' + this.statusPanel).append(this.utils.stringFormat('', + this.downloadAllButtonOnStatus, this.downloadButtonWidthOnStatus + 25, this.downloadButtonHeightOnStatus, 0, this.defaultMargin, this.fontFamily)); + + + $('#' + this.statusPanel).append(this.utils.stringFormat('0개의 파일 : 0.00B', + this.statusLabel, this.statusLabelHeight, this.rightMargin, 6, this.fontFamily)); + + $('#' + this.downloadButtonOnStatus).on("mouseover", function () + { + $(this).css("color", "#E0E0E0"); + $(this).css("outline", "none"); + }).on("mouseout", function () + { + $(this).css("color", "white"); + }); + + $('#' + this.downloadAllButtonOnStatus).on("mouseover", function () + { + $(this).css("color", "#E0E0E0"); + $(this).css("outline", "none"); + }).on("mouseout", function () + { + $(this).css("color", "white"); + }); + + + // Button panel + $('#' + this.mainPanel).append(this.utils.stringFormat('
', + this.buttonPanel, this.width, this.buttonPanelHeight)); + /* + $('#' + this.buttonPanel).append(this.utils.stringFormat('', + this.selectAllButton, this.buttonWidth, this.buttonHeight, this.leftMargin, 5, this.fontFamily)); + */ + $('#' + this.buttonPanel).append(this.utils.stringFormat('', + this.downloadButton, this.buttonWidth, this.buttonHeight, this.rightMargin, 5, this.fontFamily)); + + $.contextMenu({ + selector: '#' + this.mainPanel, + callback: function (key, options) + { + if (key == "selectAll") + self.selectAll(); + else if (key == "downloadSelectedFiles") + self.startDownload(); + else if (key == "downloadAllFiles") + self.startDownloadAll(); + + }, + items: { + "selectAll": { name: "전체선택" }, + "downloadSelectedFiles": { name: "선택파일 다운로드" }, + "downloadAllFiles": { name: "전체파일 다운로드" }, + } + }); + }; + + + this.setEventHandler = function () + { + //$('#' + this.selectAllButton).bind("click", this.onClickSelectAllButton); + $('#' + this.downloadButton).bind("click", this.onClickDownloadButton); + $('#' + this.downloadButtonOnStatus).bind("click", this.onClickDownloadButtonOnStatus); + $('#' + this.downloadAllButtonOnStatus).bind("click", this.onClickDownloadAllButtonOnStatus); + }; + + this.selectAll = function () + { + var grid = self.dataGrid; + var dataList = grid.getData(); + var itemArray = []; + for (var i = 0; i < dataList.length; i++) + itemArray.push(i); + + grid.setSelectedRows(itemArray); + } + /* + this.onClickSelectAllButton = function () { + + }; + */ + this.startDownload = function () + { + var fileInfoMap = self.fileInfoMap; + var downloadLink = self.downloadLink; + var utils = self.utils; + var dataGrid = self.dataGrid; + + var selectedRows = dataGrid.getSelectedRows(); + if (selectedRows.length == 0) + return; + + var formData = ''; + var index = 0; + for (var i = 0; i < selectedRows.length; i++) { + index = selectedRows[i]; + var fileInfo = self.getFileInfoFromMap(index); + + var obj = new Object(); + obj.fileId = fileInfo.fileId; + obj.fileName = fileInfo.fileName; + obj.fileSize = fileInfo.fileSize; + obj.fileUrl = fileInfo.fileUrl; + + formData += (JSON.stringify(obj) + ','); + } + if (formData.length > 0) { + formData = '[' + formData.substring(0, formData.length - 1) + ']'; + } + + var href = utils.stringFormat('{0}?CD_DOWNLOAD_FILE_INFO={1}', self.downloadUrl, formData); + $('#' + downloadLink).prop('href', encodeURI(href)); + if (selectedRows.length > 1) + $('#' + downloadLink).prop('download', 'zipFileDownload'); + else + $('#' + downloadLink).prop('download', fileInfo.fileName); + $('#' + downloadLink)[0].click(); + }; + + this.startDownloadAll = function () + { + self.selectAll(); + self.startDownload(); + }; + + this.onClickDownloadButton = function () + { + self.startDownload(); + }; + + this.onClickDownloadButtonOnStatus = function () + { + self.startDownload(); + }; + + this.onClickDownloadAllButtonOnStatus = function () + { + self.startDownloadAll(); + }; + + + this.addFile = function (fileInfo) + { + var obj = jQuery.parseJSON(fileInfo); + var fileId = obj.fileId; + var fileName = obj.fileName; + var fileSize = obj.fileSize; + var fileUrl = obj.fileUrl; + + var fileInfo = new __DownloadFileInfo(); + fileInfo.id = this.utils.getGuid(); + fileInfo.fileId = obj.fileId; + fileInfo.fileDirPath = ''; + fileInfo.fileName = obj.fileName; + fileInfo.fileSize = parseInt(obj.fileSize); + fileInfo.fileUrl = obj.fileUrl; + + this.fileInfoMap.set(fileInfo.id, fileInfo); + + var dataGrid = this.dataGrid; + var datas = dataGrid.getData(); + datas.splice(datas.length, 0, { + 'src': '../../app/image/file_icon/' + this.utils.getFileExtension(fileInfo.fileName) + '.png', + 'title': fileName, + 'size': this.utils.convertByteUnit(fileSize), + 'realSize': fileSize, + 'id': fileInfo.id + }); + dataGrid.invalidateRow(datas.length); + dataGrid.updateRowCount(); + dataGrid.render(); + dataGrid.scrollRowIntoView(datas.length - 1) + + this.totalFileSize += fileInfo.fileSize; + + this.updateStatus(); + } + + this.deleteFiles = function (currentRow) + { + var fileInfo = this.getFileInfoFromMap(currentRow); + + this.totalFileSize -= fileInfo.fileSize; + this.deleteFileInfoFromMap(currentRow); + this.updateStatus(); + }; + + this.deleteAllFiles = function () + { + var grid = self.dataGrid; + var dataList = grid.getData(); + //var rowsToDelete = grid.getSelectedRows().sort().reverse(); + + while (0 < dataList.length) { + self.deleteFiles(0); + dataList.splice(0, 1); + + grid.scrollRowIntoView(0 - 1) + } + + grid.invalidate(); + grid.setSelectedRows([]); + grid.resetActiveCell(); + } + + this.updateStatus = function () + { + var status = this.utils.stringFormat('{0}개의 파일 : {1}', + this.fileInfoMap.size, + this.utils.convertByteUnit(this.totalFileSize)); + $('#' + this.statusLabel).text(status); + } + + this.getTotalFileCount = function () + { + return this.dataGrid.getData().length; + } + + this.getFileInfoAt = function (rowIndex) + { + if (this.fileInfoMap.size < (rowIndex + 1)) + return '{}'; + + return this.getFileInfoToJson(this.getFileInfoFromMap(rowIndex)); + } + + this.getFileInfoToJson = function (fileInfo) + { + var keys = new Array('fileId', 'fileName', 'fileSize', 'fileUrl'); + var values = new Array(fileInfo.fileId, fileInfo.fileName, fileInfo.fileSize, fileInfo.fileUrl); + return this.utils.getJsonString(keys, values); + } + + this.scrollRow = function (row) + { + var isNumberType = (typeof row === 'number'); + + if (isNumberType == false) { + row = this.utils.getDigitString(row); + if (row == "") + row = 0; + } + + var grid = self.dataGrid; + if (grid.length - 1 > row) + row = grid.length - 1; + else if (row < 0) + row = 0; + + grid.scrollRowIntoView(row); + } + + this.getFileInfoFromMap = function (gridRowIndex) + { + var id = this.dataGrid.getDataItem(gridRowIndex)["id"]; + return this.fileInfoMap.get(id); + } + + this.deleteFileInfoFromMap = function (gridRowIndex) + { + var id = this.dataGrid.getDataItem(gridRowIndex)["id"]; + this.fileInfoMap.delete(id); + } + + this.numericSorter = function (a, b) + { + var x = a[self.currentSortCol], y = b[self.currentSortCol]; + return self.isAsc * (x == y ? 0 : (x > y ? 1 : -1)); + }; + + this.sizeSorter = function (a, b) + { + var x = a["realSize"], y = b["realSize"]; + return self.isAsc * (x == y ? 0 : (x > y ? 1 : -1)); + }; + + /* + this.ratingSorter = function(a, b) + { + var xrow = a[self.currentSortCol], yrow = b[self.currentSortCol]; + console.log(xrow); + var x = xrow[3], y = yrow[3]; + console.log(x); + return self.isAsc * (x == y ? 0 : (x > y ? 1 : -1)); + } + */ + + this.moveFirstLocation = function () + { + var grid = self.dataGrid; + var dataList = grid.getData(); + var selectedRows = grid.getSelectedRows(); + + if (selectedRows.length > 0) + { + var index = selectedRows[selectedRows.length - 1]; + if (index == 0) + return; + + var rowToInsert = dataList.splice(index, 1); + dataList.splice(0, 0, rowToInsert[0]); + grid.setSelectedRows([]); + grid.resetActiveCell(); + var itemArray = [0]; + grid.setSelectedRows(itemArray); + grid.scrollRowIntoView(0); + + grid.invalidate(); + grid.updateRowCount(); + grid.render(); + } + }; + + this.movePrevLocation = function () + { + var grid = self.dataGrid; + var dataList = grid.getData(); + var selectedRows = grid.getSelectedRows(); + + if (selectedRows.length > 0) + { + var index = selectedRows[selectedRows.length - 1]; + if (index == 0) + return; + + var rowToInsert = dataList.splice(index, 1); + dataList.splice(index - 1, 0, rowToInsert[0]); + grid.setSelectedRows([]); + grid.resetActiveCell(); + var itemArray = [index - 1]; + grid.setSelectedRows(itemArray); + grid.scrollRowIntoView(index - 1); + + grid.invalidate(); + grid.updateRowCount(); + grid.render(); + } + }; + + this.moveNextLocation = function () + { + var grid = self.dataGrid; + var dataList = grid.getData(); + var selectedRows = grid.getSelectedRows(); + + if (selectedRows.length > 0) + { + var index = selectedRows[selectedRows.length - 1]; + if (index == dataList.length - 1) + return; + + var rowToInsert = dataList.splice(index, 1); + dataList.splice(index + 1, 0, rowToInsert[0]); + grid.setSelectedRows([]); + grid.resetActiveCell(); + var itemArray = [index + 1]; + grid.setSelectedRows(itemArray); + grid.scrollRowIntoView(index + 1); + + grid.invalidate(); + grid.updateRowCount(); + grid.render(); + } + }; + + this.moveLastLocation = function () + { + var grid = self.dataGrid; + var dataList = grid.getData(); + var selectedRows = grid.getSelectedRows(); + + if (selectedRows.length > 0) + { + var index = selectedRows[selectedRows.length - 1]; + if (index == dataList.length - 1) + return; + + var rowToInsert = dataList.splice(index, 1); + dataList.splice(dataList.length, 0, rowToInsert[0]); + grid.setSelectedRows([]); + grid.resetActiveCell(); + var itemArray = [dataList.length - 1]; + grid.setSelectedRows(itemArray); + grid.scrollRowIntoView(dataList.length - 1); + + grid.invalidate(); + grid.updateRowCount(); + grid.render(); + } + }; +}; + +var __SingleFileDownloadManager = function () +{ + var self = this; + this.utils = new __NamoCrossUploaderUtils(); + this.global = new __Global(); + this.containerId = ""; + + this.mainPanel = this.utils.getGuid(); + + this.downloadLink = this.utils.getGuid(); + this.topDummyPanel = this.utils.getGuid(); + this.managerDataGrid = this.utils.getGuid(); + + this.statusPanel = this.utils.getGuid(); + this.statusLabel = this.utils.getGuid(); + + this.buttonPanel = this.utils.getGuid(); + this.selectAllButton = this.utils.getGuid(); + this.downloadButton = this.utils.getGuid(); + + this.width = 0; + this.height = 0; + //this.buttonWidth = 92; + //this.buttonHeight = 30; + this.topDummyPanelHeight = 10; + this.statusPanelHeight = 28; + this.statusHeight = 20; + this.statusLabelHeight = 20; + + this.defaultMargin = 4; + this.leftMargin = 10; + this.rightMargin = 10; + this.topMargin = 5; + + this.fileInfoMap = new Map(); + this.totalFileSize = 0; + + this.dataGrid; + + this.fontFamily = "Malgun Gothic"; + this.downloadUrl = ''; + + this.isAsc = true; + this.currentSortCol = ""; + + this.create = function (properties) + { + + this.setProperties(properties); + //this.createControls(); + this.setEventHandler(); + //this.setLastExceptionInfo(''); + }; + + this.setProperties = function (properties) + { + /* + var obj = jQuery.parseJSON(properties); + + if (obj.width.lastIndexOf("%") != -1) + this.width = Math.round(this.utils.getPxFromPercent(obj.containerId, "WIDTH") / 100 * this.utils.getDigitString(obj.width)); + else + this.width = this.utils.getDigitString(obj.width); + + if (obj.height.lastIndexOf("%") != -1) + this.height = Math.round(this.utils.getPxFromPercent(obj.containerId, "HEIGHT") / 100 * this.utils.getDigitString(obj.height)); + else + this.height = this.utils.getDigitString(obj.height); + this.containerId = obj.containerId; + this.downloadUrl = obj.downloadUrl; + */ + + if (properties == undefined) + return; + + var obj = jQuery.parseJSON(properties); + + this.containerId = obj.containerId; + + this.createControls(); + + this.resetProperties(properties); + }; + + + this.resetProperties = function (properties) + { + if (properties == undefined) + return; + + var obj = jQuery.parseJSON(properties); + + // sort + var data = this.dataGrid.getColumns(); + data[0].sortable = obj.sortable == undefined ? false : obj.sortable; + data[1].sortable = obj.sortable == undefined ? false : obj.sortable; + this.dataGrid.setColumns(data); + + this.downloadUrl = obj.downloadUrl; + + if (obj.width != undefined) { + if (obj.width.lastIndexOf("%") != -1) + this.width = Math.round(this.utils.getPxFromPercent(this.containerId, "WIDTH") / 100 * this.utils.getDigitString(obj.width)); + else + this.width = this.utils.getDigitString(obj.width); + $('#' + this.mainPanel).css('width', this.width + 'px'); + } + if (obj.height != undefined) { + if (obj.height.lastIndexOf("%") != -1) + this.height = Math.round(this.utils.getPxFromPercent(this.containerId, "HEIGHT") / 100 * this.utils.getDigitString(obj.height)); + else + this.height = this.utils.getDigitString(obj.height); + $('#' + this.mainPanel).css('height', this.height + 'px'); + } + if (obj.borderColor != undefined) { + $('#' + this.mainPanel).css('border-color', obj.borderColor); + } + + // 크기, 위치 변경 + var dataGridWidth = this.width - (this.leftMargin + this.rightMargin); + var dataGridHeight = this.height - (this.topDummyPanelHeight + this.statusPanelHeight + (this.topMargin * 2)); + $('#' + this.managerDataGrid).css('width', dataGridWidth + 'px'); + $('#' + this.managerDataGrid).css('height', dataGridHeight + 'px'); + self.dataGrid.width = dataGridWidth; + self.dataGrid.height = dataGridHeight; + var columns = self.dataGrid.getColumns(); + columns[0].width = dataGridWidth - 200; + columns[1].width = 100; + columns[2].width = 100; + self.dataGrid.setColumns(columns); + + $('#' + this.statusPanel).css('width', dataGridWidth + 'px'); + }; + + this.createControls = function () + { + // Main panel + $('#' + this.containerId).append(this.utils.stringFormat('
', + this.mainPanel, this.width, this.height)); + + // Download a tag + $('#' + this.mainPanel).append(this.utils.stringFormat('', this.downloadLink)); + + // Top dummy panel + $('#' + this.mainPanel).append(this.utils.stringFormat('
', + this.topDummyPanel, this.width, this.topDummyPanelHeight, 0, 0)); + + // DataGrid + var dataGridWidth = this.width - (this.leftMargin + this.rightMargin); + var dataGridHeight = this.height - (this.topDummyPanelHeight + this.statusPanelHeight + (this.topMargin * 2)); + $('#' + this.mainPanel).append(this.utils.stringFormat('
', + this.managerDataGrid, dataGridWidth, dataGridHeight, this.leftMargin, 0)); + + var gridWidth = this.width - (this.leftMargin + this.rightMargin); + var fieldWidth = 100; + var grid; + + var columns = []; + columns.push({ + id: "title", name: "파일이름", field: "title", width: gridWidth - (fieldWidth * 2), sortable: false, sorter: this.numericSorter, + formatter: function (args) + { + //return " " + data[args].title + "" + return " " + data[args].title + "" + } + }); + columns.push({ id: "size", name: "크기", field: "size", width: fieldWidth, cssClass: "slick-grid-filesize", sortable: false, sorter: this.utils.sizeSorter }); + columns.push({ id: "downloadButton", name: "다운로드", field: "downloadButton", width: fieldWidth, formatter: Slick.Formatters.Link, cssClass: "slick-grid-download-button" }); + + var options = { + enableCellNavigation: true, + enableColumnReorder: false, + editable: true, + enableCellNavigation: true, + forceFitColumns: true, + autoEdit: false + }; + + var data = []; + //self.dataGrid = new Slick.Grid("#" + self.managerDataGrid, data, columns, options); + + var dataView = new Slick.Data.DataView(); + dataView.setItems(data); + self.dataGrid = new Slick.Grid("#" + self.managerDataGrid, dataView.getItems(), columns, options); + + self.dataGrid.setSelectionModel(new Slick.RowSelectionModel({ selectActiveRow: true })); + self.dataGrid.onSort.subscribe(function (e, args) + { + self.dataGrid.setSelectedRows([]); + self.dataGrid.resetActiveCell(); + + self.currentSortCol = args.sortCol.field; + self.isAsc = args.sortAsc ? 1 : -1; + + dataView.sort(args.sortCol.sorter, self.isAsc); + args.grid.invalidateAllRows(); + args.grid.render(); + }); + + //var columnpicker = new Slick.Controls.ColumnPicker(columns, grid, options); + //$(function () { + //}); + + // Status panel + var statusPanelWidth = dataGridWidth; + $('#' + this.mainPanel).append(this.utils.stringFormat('
', + this.statusPanel, statusPanelWidth, this.statusPanelHeight, this.leftMargin)); + $('#' + this.statusPanel).append(this.utils.stringFormat('0개의 파일 : 0.00B', + this.statusLabel, this.statusLabelHeight, this.rightMargin, 6, this.fontFamily)); + + + /* + $.contextMenu({ + selector: '#' + this.mainPanel, + callback: function (key, options) + { + if (key == "downloadSelectedFiles") + self.downloadSelectedFiles(); + }, + items: { + "downloadSelectedFiles": { name: "다운로드" } + } + }); + */ + }; + + this.setEventHandler = function () + { + //$('#' + this.selectAllButton).bind("click", this.onClickSelectAllButton); + //$('#' + this.downloadButton).bind("click", this.onClickDownloadButton); + }; + + /* + this.onClickSelectAllButton = function () { + + }; + */ + + /* + this.downloadSelectedFiles = function () + { + var grid = self.dataGrid; + //var dataList = grid.getData(); + var rowsToDelete = grid.getSelectedRows().sort().reverse(); + + for (var i = 0; i < rowsToDelete.length; i++) + { + this.onClickDownloadButton("", rowsToDelete[i]) + } + }; + */ + + this.onClickDownloadButton = function (id, rowId) + { + var fileInfoMap = self.fileInfoMap; + var downloadLink = self.downloadLink; + var utils = self.utils; + var dataGrid = self.dataGrid; + + if (rowId < 0 || rowId >= dataGrid.length) + return; + + var fileInfo = self.getFileInfoFromMap(rowId); + + var obj = new Object(); + obj.fileId = fileInfo.fileId; + obj.fileName = fileInfo.fileName; + obj.fileSize = fileInfo.fileSize; + obj.fileUrl = fileInfo.fileUrl; + + var formData = JSON.stringify(obj); + + var href = utils.stringFormat('{0}?CD_DOWNLOAD_FILE_INFO={1}', fileInfo.fileUrl, formData); + //alert(href); + $('#' + downloadLink).prop('href', encodeURI(href)); + $('#' + downloadLink).prop('download', fileInfo.fileName); + $('#' + downloadLink)[0].click(); + }; + + this.addFile = function (fileInfo) + { + var obj = jQuery.parseJSON(fileInfo); + var fileId = obj.fileId; + var fileName = obj.fileName; + var fileSize = obj.fileSize; + var fileUrl = obj.fileUrl; + + var fileInfo = new __DownloadFileInfo(); + fileInfo.id = this.utils.getGuid(); + fileInfo.fileId = obj.fileId; + fileInfo.fileName = obj.fileName; + fileInfo.fileSize = parseInt(obj.fileSize); + fileInfo.fileUrl = obj.fileUrl; + + this.fileInfoMap.set(fileInfo.id, fileInfo); + + var dataGrid = this.dataGrid; + var datas = dataGrid.getData(); + datas.splice(datas.length, 0, { + 'src': '../../app/image/file_icon/' + this.utils.getFileExtension(fileInfo.fileName) + '.png', + 'title': fileName, + 'size': this.utils.convertByteUnit(fileSize), + 'realSize': fileSize, + 'id': fileInfo.id + }); + dataGrid.invalidateRow(datas.length); + dataGrid.updateRowCount(); + dataGrid.render(); + dataGrid.scrollRowIntoView(datas.length - 1) + + this.totalFileSize += fileInfo.fileSize; + + this.updateStatus(); + } + + this.deleteFiles = function (currentRow) + { + var fileInfo = this.getFileInfoFromMap(currentRow); + + this.totalFileSize -= fileInfo.fileSize; + this.deleteFileInfoFromMap(currentRow); + this.updateStatus(); + }; + + this.deleteAllFiles = function () + { + var grid = self.dataGrid; + var dataList = grid.getData(); + //var rowsToDelete = grid.getSelectedRows().sort().reverse(); + + while (0 < dataList.length) { + self.deleteFiles(0); + dataList.splice(0, 1); + + grid.scrollRowIntoView(0 - 1) + } + + grid.invalidate(); + grid.setSelectedRows([]); + grid.resetActiveCell(); + } + + this.updateStatus = function () + { + var status = this.utils.stringFormat('{0}개의 파일 : {1}', + this.fileInfoMap.size, + this.utils.convertByteUnit(this.totalFileSize)); + $('#' + this.statusLabel).text(status); + } + + this.getTotalFileCount = function () + { + return this.dataGrid.getData().length; + } + + this.getFileInfoAt = function (rowIndex) + { + if (this.fileInfoMap.size < (rowIndex + 1)) + return '{}'; + + return this.getFileInfoToJson(this.getFileInfoFromMap(rowIndex)); + } + + this.getFileInfoToJson = function (fileInfo) + { + var keys = new Array('fileId', 'fileName', 'fileSize', 'fileUrl'); + var values = new Array(fileInfo.fileId, fileInfo.fileName, fileInfo.fileSize, fileInfo.fileUrl); + return this.utils.getJsonString(keys, values); + } + + this.scrollRow = function (row) + { + var isNumberType = (typeof row === 'number'); + + if (isNumberType == false) { + row = this.utils.getDigitString(row); + if (row == "") + row = 0; + } + + var grid = self.dataGrid; + if (grid.length - 1 > row) + row = grid.length - 1; + else if (row < 0) + row = 0; + + grid.scrollRowIntoView(row); + } + + this.getFileInfoFromMap = function (gridRowIndex) + { + var id = this.dataGrid.getDataItem(gridRowIndex)["id"]; + return this.fileInfoMap.get(id); + } + + this.deleteFileInfoFromMap = function (gridRowIndex) + { + var id = this.dataGrid.getDataItem(gridRowIndex)["id"]; + this.fileInfoMap.delete(id); + } + + this.numericSorter = function (a, b) + { + var x = a[self.currentSortCol], y = b[self.currentSortCol]; + return self.isAsc * (x == y ? 0 : (x > y ? 1 : -1)); + }; + + this.sizeSorter = function (a, b) + { + var x = a["realSize"], y = b["realSize"]; + return self.isAsc * (x == y ? 0 : (x > y ? 1 : -1)); + }; + + /* + this.ratingSorter = function(a, b) + { + var xrow = a[self.currentSortCol], yrow = b[self.currentSortCol]; + console.log(xrow); + var x = xrow[3], y = yrow[3]; + console.log(x); + return self.isAsc * (x == y ? 0 : (x > y ? 1 : -1)); + } + */ + + this.moveFirstLocation = function () + { + var grid = self.dataGrid; + var dataList = grid.getData(); + var selectedRows = grid.getSelectedRows(); + + if (selectedRows.length > 0) + { + var index = selectedRows[selectedRows.length - 1]; + if (index == 0) + return; + + var rowToInsert = dataList.splice(index, 1); + dataList.splice(0, 0, rowToInsert[0]); + grid.setSelectedRows([]); + grid.resetActiveCell(); + var itemArray = [0]; + grid.setSelectedRows(itemArray); + grid.scrollRowIntoView(0); + + grid.invalidate(); + grid.updateRowCount(); + grid.render(); + } + }; + + this.movePrevLocation = function () + { + var grid = self.dataGrid; + var dataList = grid.getData(); + var selectedRows = grid.getSelectedRows(); + + if (selectedRows.length > 0) + { + var index = selectedRows[selectedRows.length - 1]; + if (index == 0) + return; + + var rowToInsert = dataList.splice(index, 1); + dataList.splice(index - 1, 0, rowToInsert[0]); + grid.setSelectedRows([]); + grid.resetActiveCell(); + var itemArray = [index - 1]; + grid.setSelectedRows(itemArray); + grid.scrollRowIntoView(index - 1); + + grid.invalidate(); + grid.updateRowCount(); + grid.render(); + } + }; + + this.moveNextLocation = function () + { + var grid = self.dataGrid; + var dataList = grid.getData(); + var selectedRows = grid.getSelectedRows(); + + if (selectedRows.length > 0) + { + var index = selectedRows[selectedRows.length - 1]; + if (index == dataList.length - 1) + return; + + var rowToInsert = dataList.splice(index, 1); + dataList.splice(index + 1, 0, rowToInsert[0]); + grid.setSelectedRows([]); + grid.resetActiveCell(); + var itemArray = [index + 1]; + grid.setSelectedRows(itemArray); + grid.scrollRowIntoView(index + 1); + + grid.invalidate(); + grid.updateRowCount(); + grid.render(); + } + }; + + this.moveLastLocation = function () + { + var grid = self.dataGrid; + var dataList = grid.getData(); + var selectedRows = grid.getSelectedRows(); + + if (selectedRows.length > 0) + { + var index = selectedRows[selectedRows.length - 1]; + if (index == dataList.length - 1) + return; + + var rowToInsert = dataList.splice(index, 1); + dataList.splice(dataList.length, 0, rowToInsert[0]); + grid.setSelectedRows([]); + grid.resetActiveCell(); + var itemArray = [dataList.length - 1]; + grid.setSelectedRows(itemArray); + grid.scrollRowIntoView(dataList.length - 1); + + grid.invalidate(); + grid.updateRowCount(); + grid.render(); + } + }; +}; +var __NamoCrossUploader = function () +{ + this.fileUploadManager = null; + this.fileUploadMonitor = null; + + this.multipleFileDownloadManager = null; + this.singleFileDownloadManager = null; + + this.createUploader = function (managerProperties, monitorProperties, eventNames) + { + this.fileUploadManager = new __FileUploadManager(this); + this.fileUploadMonitor = new __FileUploadMonitor(this); + + this.fileUploadManager.create(managerProperties, eventNames); + + var obj = jQuery.parseJSON(managerProperties); + this.fileUploadMonitor.create(monitorProperties, obj.uploadMode); + + return this.fileUploadManager; + }; + + this.createDownloader = function (managerProperties) + { + var obj = jQuery.parseJSON(managerProperties); + if (obj.uiMode == undefined || obj.uiMode == 'MULTIPLE') { + this.multipleFileDownloadManager = new __MultipleFileDownloadManager(); + this.multipleFileDownloadManager.create(managerProperties); + return this.multipleFileDownloadManager; + } + else { + this.singleFileDownloadManager = new __SingleFileDownloadManager(); + this.singleFileDownloadManager.create(managerProperties); + return this.singleFileDownloadManager; + } + }; + + this.setUploaderProperties = function (managerProperties, monitorProperties) + { + this.fileUploadManager.resetProperties(managerProperties); + this.fileUploadMonitor.resetProperties(monitorProperties); + } + + this.setDownloaderProperties = function (managerProperties) + { + var obj = jQuery.parseJSON(managerProperties); + if (obj.uiMode == undefined || obj.uiMode == 'MULTIPLE') { + this.multipleFileDownloadManager.resetProperties(managerProperties); + } + else { + this.singleFileDownloadManager.resetProperties(managerProperties); + } + }; +}; + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net20/Newtonsoft.Json.dll b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net20/Newtonsoft.Json.dll new file mode 100644 index 00000000..71c489a3 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net20/Newtonsoft.Json.dll differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net20/Newtonsoft.Json.pdb b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net20/Newtonsoft.Json.pdb new file mode 100644 index 00000000..e6f3a520 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net20/Newtonsoft.Json.pdb differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net20/Newtonsoft.Json.xml b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net20/Newtonsoft.Json.xml new file mode 100644 index 00000000..68804eeb --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net20/Newtonsoft.Json.xml @@ -0,0 +1,9439 @@ + + + + Newtonsoft.Json + + + + + Represents a BSON Oid (object id). + + + + + Initializes a new instance of the class. + + The Oid value. + + + + Gets or sets the value of the Oid. + + The value of the Oid. + + + + Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. + + + + + Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. + + + + + Initializes a new instance of the class with the specified . + + + + + Reads the next JSON token from the stream. + + true if the next token was read successfully; false if there are no more tokens to read. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a []. + + A [] or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Skips the children of the current token. + + + + + Sets the current token. + + The new token. + + + + Sets the current token and value. + + The new token. + The value. + + + + Sets the state based on current token type. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Releases unmanaged and - optionally - managed resources + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Changes the to Closed. + + + + + Gets the current reader state. + + The current reader state. + + + + Gets or sets a value indicating whether the underlying stream or + should be closed when the reader is closed. + + + true to close the underlying stream or when + the reader is closed; otherwise false. The default is true. + + + + + Gets or sets a value indicating whether multiple pieces of JSON content can + be read from a continuous stream without erroring. + + + true to support reading multiple pieces of JSON content; otherwise false. The default is false. + + + + + Gets the quotation mark character used to enclose the value of a string. + + + + + Get or set how time zones are handling when reading JSON. + + + + + Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. + + + + + Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Get or set how custom date formatted strings are parsed when reading JSON. + + + + + Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + + + + + Gets the type of the current JSON token. + + + + + Gets the text value of the current JSON token. + + + + + Gets The Common Language Runtime (CLR) type for the current JSON token. + + + + + Gets the depth of the current token in the JSON document. + + The depth of the current token in the JSON document. + + + + Gets the path of the current JSON token. + + + + + Gets or sets the culture used when reading JSON. Defaults to . + + + + + Specifies the state of the reader. + + + + + The Read method has not been called. + + + + + The end of the file has been reached successfully. + + + + + Reader is at a property. + + + + + Reader is at the start of an object. + + + + + Reader is in an object. + + + + + Reader is at the start of an array. + + + + + Reader is in an array. + + + + + The Close method has been called. + + + + + Reader has just read a value. + + + + + Reader is at the start of a constructor. + + + + + Reader in a constructor. + + + + + An error occurred that prevents the read operation from continuing. + + + + + The end of the file has been reached successfully. + + + + + Initializes a new instance of the class. + + The stream. + + + + Initializes a new instance of the class. + + The reader. + + + + Initializes a new instance of the class. + + The stream. + if set to true the root object will be read as a JSON array. + The used when reading values from BSON. + + + + Initializes a new instance of the class. + + The reader. + if set to true the root object will be read as a JSON array. + The used when reading values from BSON. + + + + Reads the next JSON token from the stream as a []. + + + A [] or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Changes the to Closed. + + + + + Gets or sets a value indicating whether binary data reading should compatible with incorrect Json.NET 3.5 written binary. + + + true if binary data reading will be compatible with incorrect Json.NET 3.5 written binary; otherwise, false. + + + + + Gets or sets a value indicating whether the root object will be read as a JSON array. + + + true if the root object will be read as a JSON array; otherwise, false. + + + + + Gets or sets the used when reading values from BSON. + + The used when reading values from BSON. + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Creates an instance of the JsonWriter class. + + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Closes this stream and the underlying stream. + + + + + Writes the beginning of a JSON object. + + + + + Writes the end of a JSON object. + + + + + Writes the beginning of a JSON array. + + + + + Writes the end of an array. + + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes the end constructor. + + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + A flag to indicate whether the text should be escaped when it is written as a JSON property name. + + + + Writes the end of the current JSON object or array. + + + + + Writes the current token and its children. + + The to read the token from. + + + + Writes the current token. + + The to read the token from. + A flag indicating whether the current token's children should be written. + + + + Writes the token and its value. + + The to write. + + The value to write. + A value is only required for tokens that have an associated value, e.g. the property name for . + A null value can be passed to the method for token's that don't have a value, e.g. . + + + + Writes the token. + + The to write. + + + + Writes the specified end token. + + The end token to write. + + + + Writes indent characters. + + + + + Writes the JSON value delimiter. + + + + + Writes an indent space. + + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes raw JSON without changing the writer's state. + + The raw JSON to write. + + + + Writes raw JSON where a value is expected and updates the writer's state. + + The raw JSON to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes out the given white space. + + The string of white space characters. + + + + Sets the state of the JsonWriter, + + The JsonToken being written. + The value being written. + + + + Gets or sets a value indicating whether the underlying stream or + should be closed when the writer is closed. + + + true to close the underlying stream or when + the writer is closed; otherwise false. The default is true. + + + + + Gets the top. + + The top. + + + + Gets the state of the writer. + + + + + Gets the path of the writer. + + + + + Indicates how JSON text output is formatted. + + + + + Get or set how dates are written to JSON text. + + + + + Get or set how time zones are handling when writing JSON text. + + + + + Get or set how strings are escaped when writing JSON text. + + + + + Get or set how special floating point numbers, e.g. , + and , + are written to JSON text. + + + + + Get or set how and values are formatting when writing JSON text. + + + + + Gets or sets the culture used when writing JSON. Defaults to . + + + + + Initializes a new instance of the class. + + The stream. + + + + Initializes a new instance of the class. + + The writer. + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Writes the end. + + The token. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes raw JSON. + + The raw JSON to write. + + + + Writes raw JSON where a value is expected and updates the writer's state. + + The raw JSON to write. + + + + Writes the beginning of a JSON array. + + + + + Writes the beginning of a JSON object. + + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Closes this stream and the underlying stream. + + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value that represents a BSON object id. + + The Object ID value to write. + + + + Writes a BSON regex. + + The regex pattern. + The regex options. + + + + Gets or sets the used when writing values to BSON. + When set to no conversion will occur. + + The used when writing values to BSON. + + + + Specifies how constructors are used when initializing objects during deserialization by the . + + + + + First attempt to use the public default constructor, then fall back to single paramatized constructor, then the non-public default constructor. + + + + + Json.NET will use a non-public default constructor before falling back to a paramatized constructor. + + + + + Converts a binary value to and from a base 64 string value. + + + + + Converts an object to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + + Gets the of the JSON produced by the JsonConverter. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The of the JSON produced by the JsonConverter. + + + + Gets a value indicating whether this can read JSON. + + true if this can read JSON; otherwise, false. + + + + Gets a value indicating whether this can write JSON. + + true if this can write JSON; otherwise, false. + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts a to and from JSON and BSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Create a custom object + + The object type to convert. + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Creates an object which will then be populated by the serializer. + + Type of the object. + The created object. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Gets a value indicating whether this can write JSON. + + + true if this can write JSON; otherwise, false. + + + + + Converts a to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified value type. + + Type of the value. + + true if this instance can convert the specified value type; otherwise, false. + + + + + Converts a to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified value type. + + Type of the value. + + true if this instance can convert the specified value type; otherwise, false. + + + + + Provides a base class for converting a to and from JSON. + + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts a to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts a to and from JSON and BSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts an to and from its name string value. + + + + + Initializes a new instance of the class. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Gets or sets a value indicating whether the written enum text should be camel case. + + true if the written enum text will be camel case; otherwise, false. + + + + Gets or sets a value indicating whether integer values are allowed. + + true if integers are allowed; otherwise, false. + + + + Converts a to and from a string (e.g. "1.2.3.4"). + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing property value of the JSON that is being converted. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Specifies how dates are formatted when writing JSON text. + + + + + Dates are written in the ISO 8601 format, e.g. "2012-03-21T05:40Z". + + + + + Dates are written in the Microsoft JSON format, e.g. "\/Date(1198908717056)\/". + + + + + Specifies how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON text. + + + + + Date formatted strings are not parsed to a date type and are read as strings. + + + + + Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . + + + + + Specifies how to treat the time value when converting between string and . + + + + + Treat as local time. If the object represents a Coordinated Universal Time (UTC), it is converted to the local time. + + + + + Treat as a UTC. If the object represents a local time, it is converted to a UTC. + + + + + Treat as a local time if a is being converted to a string. + If a string is being converted to , convert to a local time if a time zone is specified. + + + + + Time zone information should be preserved when converting. + + + + + Specifies float format handling options when writing special floating point numbers, e.g. , + and with . + + + + + Write special floating point values as strings in JSON, e.g. "NaN", "Infinity", "-Infinity". + + + + + Write special floating point values as symbols in JSON, e.g. NaN, Infinity, -Infinity. + Note that this will produce non-valid JSON. + + + + + Write special floating point values as the property's default value in JSON, e.g. 0.0 for a property, null for a property. + + + + + Specifies how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Floating point numbers are parsed to . + + + + + Floating point numbers are parsed to . + + + + + Specifies formatting options for the . + + + + + No special formatting is applied. This is the default. + + + + + Causes child objects to be indented according to the and settings. + + + + + Instructs the to use the specified constructor when deserializing that object. + + + + + Instructs the how to serialize the collection. + + + + + Instructs the how to serialize the object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + Gets or sets the id. + + The id. + + + + Gets or sets the title. + + The title. + + + + Gets or sets the description. + + The description. + + + + Gets the collection's items converter. + + The collection's items converter. + + + + The parameter list to use when constructing the JsonConverter described by ItemConverterType. + If null, the default constructor is used. + When non-null, there must be a constructor defined in the JsonConverter that exactly matches the number, + order, and type of these parameters. + + + [JsonContainer(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })] + + + + + Gets or sets a value that indicates whether to preserve object references. + + + true to keep object reference; otherwise, false. The default is false. + + + + + Gets or sets a value that indicates whether to preserve collection's items references. + + + true to keep collection's items object references; otherwise, false. The default is false. + + + + + Gets or sets the reference loop handling used when serializing the collection's items. + + The reference loop handling. + + + + Gets or sets the type name handling used when serializing the collection's items. + + The type name handling. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + The exception thrown when an error occurs during JSON serialization or deserialization. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Instructs the to deserialize properties with no matching class member into the specified collection + and write values during serialization. + + + + + Initializes a new instance of the class. + + + + + Gets or sets a value that indicates whether to write extension data when serializing the object. + + + true to write extension data when serializing the object; otherwise, false. The default is true. + + + + + Gets or sets a value that indicates whether to read extension data when deserializing the object. + + + true to read extension data when deserializing the object; otherwise, false. The default is true. + + + + + Instructs the to always serialize the member, and require the member has a value. + + + + + Specifies the settings used when merging JSON. + + + + + Gets or sets the method used when merging JSON arrays. + + The method used when merging JSON arrays. + + + + Specifies how JSON arrays are merged together. + + + + Concatenate arrays. + + + Union arrays, skipping items that already exist. + + + Replace all array items. + + + Merge array items together, matched by index. + + + + Specifies metadata property handling options for the . + + + + + Read metadata properties located at the start of a JSON object. + + + + + Read metadata properties located anywhere in a JSON object. Note that this setting will impact performance. + + + + + Do not try to read metadata properties. + + + + + Represents a trace writer that writes to the application's instances. + + + + + Represents a trace writer. + + + + + Writes the specified trace level, message and optional exception. + + The at which to write this trace. + The trace message. + The trace exception. This parameter is optional. + + + + Gets the that will be used to filter the trace messages passed to the writer. + For example a filter level of Info will exclude Verbose messages and include Info, + Warning and Error messages. + + The that will be used to filter the trace messages passed to the writer. + + + + Writes the specified trace level, message and optional exception. + + The at which to write this trace. + The trace message. + The trace exception. This parameter is optional. + + + + Gets the that will be used to filter the trace messages passed to the writer. + For example a filter level of Info will exclude Verbose messages and include Info, + Warning and Error messages. + + + The that will be used to filter the trace messages passed to the writer. + + + + + Provides methods to get attributes. + + + + + Returns a collection of all of the attributes, or an empty collection if there are no attributes. + + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Returns a collection of attributes, identified by type, or an empty collection if there are no attributes. + + The type of the attributes. + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Contract details for a used by the . + + + + + Contract details for a used by the . + + + + + Gets the underlying type for the contract. + + The underlying type for the contract. + + + + Gets or sets the type created during deserialization. + + The type created during deserialization. + + + + Gets or sets whether this type contract is serialized as a reference. + + Whether this type contract is serialized as a reference. + + + + Gets or sets the default for this contract. + + The converter. + + + + Gets or sets all methods called immediately after deserialization of the object. + + The methods called immediately after deserialization of the object. + + + + Gets or sets all methods called during deserialization of the object. + + The methods called during deserialization of the object. + + + + Gets or sets all methods called after serialization of the object graph. + + The methods called after serialization of the object graph. + + + + Gets or sets all methods called before serialization of the object. + + The methods called before serialization of the object. + + + + Gets or sets all method called when an error is thrown during the serialization of the object. + + The methods called when an error is thrown during the serialization of the object. + + + + Gets or sets the method called immediately after deserialization of the object. + + The method called immediately after deserialization of the object. + + + + Gets or sets the method called during deserialization of the object. + + The method called during deserialization of the object. + + + + Gets or sets the method called after serialization of the object graph. + + The method called after serialization of the object graph. + + + + Gets or sets the method called before serialization of the object. + + The method called before serialization of the object. + + + + Gets or sets the method called when an error is thrown during the serialization of the object. + + The method called when an error is thrown during the serialization of the object. + + + + Gets or sets the default creator method used to create the object. + + The default creator method used to create the object. + + + + Gets or sets a value indicating whether the default creator is non public. + + true if the default object creator is non-public; otherwise, false. + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets or sets the default collection items . + + The converter. + + + + Gets or sets a value indicating whether the collection items preserve object references. + + true if collection items preserve object references; otherwise, false. + + + + Gets or sets the collection item reference loop handling. + + The reference loop handling. + + + + Gets or sets the collection item type name handling. + + The type name handling. + + + + Represents a trace writer that writes to memory. When the trace message limit is + reached then old trace messages will be removed as new messages are added. + + + + + Initializes a new instance of the class. + + + + + Writes the specified trace level, message and optional exception. + + The at which to write this trace. + The trace message. + The trace exception. This parameter is optional. + + + + Returns an enumeration of the most recent trace messages. + + An enumeration of the most recent trace messages. + + + + Returns a of the most recent trace messages. + + + A of the most recent trace messages. + + + + + Gets the that will be used to filter the trace messages passed to the writer. + For example a filter level of Info will exclude Verbose messages and include Info, + Warning and Error messages. + + + The that will be used to filter the trace messages passed to the writer. + + + + + Provides methods to get attributes from a , , or . + + + + + Initializes a new instance of the class. + + The instance to get attributes for. This parameter should be a , , or . + + + + Returns a collection of all of the attributes, or an empty collection if there are no attributes. + + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Returns a collection of attributes, identified by type, or an empty collection if there are no attributes. + + The type of the attributes. + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Provides an interface to enable a class to return line and position information. + + + + + Gets a value indicating whether the class can return line information. + + + true if LineNumber and LinePosition can be provided; otherwise, false. + + + + + Gets the current line number. + + The current line number or 0 if no line information is available (for example, HasLineInfo returns false). + + + + Gets the current line position. + + The current line position or 0 if no line information is available (for example, HasLineInfo returns false). + + + + Specifies how strings are escaped when writing JSON text. + + + + + Only control characters (e.g. newline) are escaped. + + + + + All non-ASCII and control characters (e.g. newline) are escaped. + + + + + HTML (<, >, &, ', ") and control characters (e.g. newline) are escaped. + + + + + Provides a set of static (Shared in Visual Basic) methods for + querying objects that implement . + + + + + Returns the input typed as . + + + + + Returns an empty that has the + specified type argument. + + + + + Converts the elements of an to the + specified type. + + + + + Filters the elements of an based on a specified type. + + + + + Generates a sequence of integral numbers within a specified range. + + The value of the first integer in the sequence. + The number of sequential integers to generate. + + + + Generates a sequence that contains one repeated value. + + + + + Filters a sequence of values based on a predicate. + + + + + Filters a sequence of values based on a predicate. + Each element's index is used in the logic of the predicate function. + + + + + Projects each element of a sequence into a new form. + + + + + Projects each element of a sequence into a new form by + incorporating the element's index. + + + + + Projects each element of a sequence to an + and flattens the resulting sequences into one sequence. + + + + + Projects each element of a sequence to an , + and flattens the resulting sequences into one sequence. The + index of each source element is used in the projected form of + that element. + + + + + Projects each element of a sequence to an , + flattens the resulting sequences into one sequence, and invokes + a result selector function on each element therein. + + + + + Projects each element of a sequence to an , + flattens the resulting sequences into one sequence, and invokes + a result selector function on each element therein. The index of + each source element is used in the intermediate projected form + of that element. + + + + + Returns elements from a sequence as long as a specified condition is true. + + + + + Returns elements from a sequence as long as a specified condition is true. + The element's index is used in the logic of the predicate function. + + + + + Base implementation of First operator. + + + + + Returns the first element of a sequence. + + + + + Returns the first element in a sequence that satisfies a specified condition. + + + + + Returns the first element of a sequence, or a default value if + the sequence contains no elements. + + + + + Returns the first element of the sequence that satisfies a + condition or a default value if no such element is found. + + + + + Base implementation of Last operator. + + + + + Returns the last element of a sequence. + + + + + Returns the last element of a sequence that satisfies a + specified condition. + + + + + Returns the last element of a sequence, or a default value if + the sequence contains no elements. + + + + + Returns the last element of a sequence that satisfies a + condition or a default value if no such element is found. + + + + + Base implementation of Single operator. + + + + + Returns the only element of a sequence, and throws an exception + if there is not exactly one element in the sequence. + + + + + Returns the only element of a sequence that satisfies a + specified condition, and throws an exception if more than one + such element exists. + + + + + Returns the only element of a sequence, or a default value if + the sequence is empty; this method throws an exception if there + is more than one element in the sequence. + + + + + Returns the only element of a sequence that satisfies a + specified condition or a default value if no such element + exists; this method throws an exception if more than one element + satisfies the condition. + + + + + Returns the element at a specified index in a sequence. + + + + + Returns the element at a specified index in a sequence or a + default value if the index is out of range. + + + + + Inverts the order of the elements in a sequence. + + + + + Returns a specified number of contiguous elements from the start + of a sequence. + + + + + Bypasses a specified number of elements in a sequence and then + returns the remaining elements. + + + + + Bypasses elements in a sequence as long as a specified condition + is true and then returns the remaining elements. + + + + + Bypasses elements in a sequence as long as a specified condition + is true and then returns the remaining elements. The element's + index is used in the logic of the predicate function. + + + + + Returns the number of elements in a sequence. + + + + + Returns a number that represents how many elements in the + specified sequence satisfy a condition. + + + + + Returns an that represents the total number + of elements in a sequence. + + + + + Returns an that represents how many elements + in a sequence satisfy a condition. + + + + + Concatenates two sequences. + + + + + Creates a from an . + + + + + Creates an array from an . + + + + + Returns distinct elements from a sequence by using the default + equality comparer to compare values. + + + + + Returns distinct elements from a sequence by using a specified + to compare values. + + + + + Creates a from an + according to a specified key + selector function. + + + + + Creates a from an + according to a specified key + selector function and a key comparer. + + + + + Creates a from an + according to specified key + and element selector functions. + + + + + Creates a from an + according to a specified key + selector function, a comparer and an element selector function. + + + + + Groups the elements of a sequence according to a specified key + selector function. + + + + + Groups the elements of a sequence according to a specified key + selector function and compares the keys by using a specified + comparer. + + + + + Groups the elements of a sequence according to a specified key + selector function and projects the elements for each group by + using a specified function. + + + + + Groups the elements of a sequence according to a specified key + selector function and creates a result value from each group and + its key. + + + + + Groups the elements of a sequence according to a key selector + function. The keys are compared by using a comparer and each + group's elements are projected by using a specified function. + + + + + Groups the elements of a sequence according to a specified key + selector function and creates a result value from each group and + its key. The elements of each group are projected by using a + specified function. + + + + + Groups the elements of a sequence according to a specified key + selector function and creates a result value from each group and + its key. The keys are compared by using a specified comparer. + + + + + Groups the elements of a sequence according to a specified key + selector function and creates a result value from each group and + its key. Key values are compared by using a specified comparer, + and the elements of each group are projected by using a + specified function. + + + + + Applies an accumulator function over a sequence. + + + + + Applies an accumulator function over a sequence. The specified + seed value is used as the initial accumulator value. + + + + + Applies an accumulator function over a sequence. The specified + seed value is used as the initial accumulator value, and the + specified function is used to select the result value. + + + + + Produces the set union of two sequences by using the default + equality comparer. + + + + + Produces the set union of two sequences by using a specified + . + + + + + Returns the elements of the specified sequence or the type + parameter's default value in a singleton collection if the + sequence is empty. + + + + + Returns the elements of the specified sequence or the specified + value in a singleton collection if the sequence is empty. + + + + + Determines whether all elements of a sequence satisfy a condition. + + + + + Determines whether a sequence contains any elements. + + + + + Determines whether any element of a sequence satisfies a + condition. + + + + + Determines whether a sequence contains a specified element by + using the default equality comparer. + + + + + Determines whether a sequence contains a specified element by + using a specified . + + + + + Determines whether two sequences are equal by comparing the + elements by using the default equality comparer for their type. + + + + + Determines whether two sequences are equal by comparing their + elements by using a specified . + + + + + Base implementation for Min/Max operator. + + + + + Base implementation for Min/Max operator for nullable types. + + + + + Returns the minimum value in a generic sequence. + + + + + Invokes a transform function on each element of a generic + sequence and returns the minimum resulting value. + + + + + Returns the maximum value in a generic sequence. + + + + + Invokes a transform function on each element of a generic + sequence and returns the maximum resulting value. + + + + + Makes an enumerator seen as enumerable once more. + + + The supplied enumerator must have been started. The first element + returned is the element the enumerator was on when passed in. + DO NOT use this method if the caller must be a generator. It is + mostly safe among aggregate operations. + + + + + Sorts the elements of a sequence in ascending order according to a key. + + + + + Sorts the elements of a sequence in ascending order by using a + specified comparer. + + + + + Sorts the elements of a sequence in descending order according to a key. + + + + + Sorts the elements of a sequence in descending order by using a + specified comparer. + + + + + Performs a subsequent ordering of the elements in a sequence in + ascending order according to a key. + + + + + Performs a subsequent ordering of the elements in a sequence in + ascending order by using a specified comparer. + + + + + Performs a subsequent ordering of the elements in a sequence in + descending order, according to a key. + + + + + Performs a subsequent ordering of the elements in a sequence in + descending order by using a specified comparer. + + + + + Base implementation for Intersect and Except operators. + + + + + Produces the set intersection of two sequences by using the + default equality comparer to compare values. + + + + + Produces the set intersection of two sequences by using the + specified to compare values. + + + + + Produces the set difference of two sequences by using the + default equality comparer to compare values. + + + + + Produces the set difference of two sequences by using the + specified to compare values. + + + + + Creates a from an + according to a specified key + selector function. + + + + + Creates a from an + according to a specified key + selector function and key comparer. + + + + + Creates a from an + according to specified key + selector and element selector functions. + + + + + Creates a from an + according to a specified key + selector function, a comparer, and an element selector function. + + + + + Correlates the elements of two sequences based on matching keys. + The default equality comparer is used to compare keys. + + + + + Correlates the elements of two sequences based on matching keys. + The default equality comparer is used to compare keys. A + specified is used to compare keys. + + + + + Correlates the elements of two sequences based on equality of + keys and groups the results. The default equality comparer is + used to compare keys. + + + + + Correlates the elements of two sequences based on equality of + keys and groups the results. The default equality comparer is + used to compare keys. A specified + is used to compare keys. + + + + + Computes the sum of a sequence of nullable values. + + + + + Computes the sum of a sequence of nullable + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of nullable values. + + + + + Computes the average of a sequence of nullable values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Computes the sum of a sequence of values. + + + + + Computes the sum of a sequence of + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of values. + + + + + Computes the average of a sequence of values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Returns the minimum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the minimum nullable value. + + + + + Returns the maximum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the maximum nullable value. + + + + + Computes the sum of a sequence of nullable values. + + + + + Computes the sum of a sequence of nullable + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of nullable values. + + + + + Computes the average of a sequence of nullable values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Computes the sum of a sequence of values. + + + + + Computes the sum of a sequence of + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of values. + + + + + Computes the average of a sequence of values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Returns the minimum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the minimum nullable value. + + + + + Returns the maximum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the maximum nullable value. + + + + + Computes the sum of a sequence of nullable values. + + + + + Computes the sum of a sequence of nullable + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of nullable values. + + + + + Computes the average of a sequence of nullable values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Computes the sum of a sequence of values. + + + + + Computes the sum of a sequence of + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of values. + + + + + Computes the average of a sequence of values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Returns the minimum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the minimum nullable value. + + + + + Returns the maximum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the maximum nullable value. + + + + + Computes the sum of a sequence of nullable values. + + + + + Computes the sum of a sequence of nullable + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of nullable values. + + + + + Computes the average of a sequence of nullable values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Computes the sum of a sequence of values. + + + + + Computes the sum of a sequence of + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of values. + + + + + Computes the average of a sequence of values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Returns the minimum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the minimum nullable value. + + + + + Returns the maximum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the maximum nullable value. + + + + + Computes the sum of a sequence of nullable values. + + + + + Computes the sum of a sequence of nullable + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of nullable values. + + + + + Computes the average of a sequence of nullable values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Computes the sum of a sequence of values. + + + + + Computes the sum of a sequence of + values that are obtained by invoking a transform function on + each element of the input sequence. + + + + + Computes the average of a sequence of values. + + + + + Computes the average of a sequence of values + that are obtained by invoking a transform function on each + element of the input sequence. + + + + + Returns the minimum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the minimum nullable value. + + + + + Returns the maximum value in a sequence of nullable + values. + + + + + Invokes a transform function on each element of a sequence and + returns the maximum nullable value. + + + + + Represents a collection of objects that have a common key. + + + + + Gets the key of the . + + + + + Defines an indexer, size property, and Boolean search method for + data structures that map keys to + sequences of values. + + + + + Represents a sorted sequence. + + + + + Performs a subsequent ordering on the elements of an + according to a key. + + + + + Represents a collection of keys each mapped to one or more values. + + + + + Determines whether a specified key is in the . + + + + + Applies a transform function to each key and its associated + values and returns the results. + + + + + Returns a generic enumerator that iterates through the . + + + + + Gets the number of key/value collection pairs in the . + + + + + Gets the collection of values indexed by the specified key. + + + + + See issue #11 + for why this method is needed and cannot be expressed as a + lambda at the call site. + + + + + See issue #11 + for why this method is needed and cannot be expressed as a + lambda at the call site. + + + + + This attribute allows us to define extension methods without + requiring .NET Framework 3.5. For more information, see the section, + Extension Methods in .NET Framework 2.0 Apps, + of Basic Instincts: Extension Methods + column in MSDN Magazine, + issue Nov 2007. + + + + + Represents a view of a . + + + + + Initializes a new instance of the class. + + The name. + + + + When overridden in a derived class, returns whether resetting an object changes its value. + + + true if resetting the component changes its value; otherwise, false. + + The component to test for reset capability. + + + + + When overridden in a derived class, gets the current value of the property on a component. + + + The value of a property for a given component. + + The component with the property for which to retrieve the value. + + + + + When overridden in a derived class, resets the value for this property of the component to the default value. + + The component with the property value that is to be reset to the default value. + + + + + When overridden in a derived class, sets the value of the component to a different value. + + The component with the property value that is to be set. + The new value. + + + + + When overridden in a derived class, determines a value indicating whether the value of this property needs to be persisted. + + + true if the property should be persisted; otherwise, false. + + The component with the property to be examined for persistence. + + + + + When overridden in a derived class, gets the type of the component this property is bound to. + + + A that represents the type of component this property is bound to. When the or methods are invoked, the object specified might be an instance of this type. + + + + + When overridden in a derived class, gets a value indicating whether this property is read-only. + + + true if the property is read-only; otherwise, false. + + + + + When overridden in a derived class, gets the type of the property. + + + A that represents the type of the property. + + + + + Gets the hash code for the name of the member. + + + + The hash code for the name of the member. + + + + + Represents a raw JSON string. + + + + + Represents a value in JSON (string, integer, date, etc). + + + + + Represents an abstract JSON token. + + + + + Represents a collection of objects. + + The type of token + + + + Gets the with the specified key. + + + + + + Compares the values of two tokens, including the values of all descendant tokens. + + The first to compare. + The second to compare. + true if the tokens are equal; otherwise false. + + + + Adds the specified content immediately after this token. + + A content object that contains simple content or a collection of content objects to be added after this token. + + + + Adds the specified content immediately before this token. + + A content object that contains simple content or a collection of content objects to be added before this token. + + + + Returns a collection of the ancestor tokens of this token. + + A collection of the ancestor tokens of this token. + + + + Returns a collection of tokens that contain this token, and the ancestors of this token. + + A collection of tokens that contain this token, and the ancestors of this token. + + + + Returns a collection of the sibling tokens after this token, in document order. + + A collection of the sibling tokens after this tokens, in document order. + + + + Returns a collection of the sibling tokens before this token, in document order. + + A collection of the sibling tokens before this token, in document order. + + + + Gets the with the specified key converted to the specified type. + + The type to convert the token to. + The token key. + The converted token value. + + + + Returns a collection of the child tokens of this token, in document order. + + An of containing the child tokens of this , in document order. + + + + Returns a collection of the child tokens of this token, in document order, filtered by the specified type. + + The type to filter the child tokens on. + A containing the child tokens of this , in document order. + + + + Returns a collection of the child values of this token, in document order. + + The type to convert the values to. + A containing the child values of this , in document order. + + + + Removes this token from its parent. + + + + + Replaces this token with the specified token. + + The value. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Returns the indented JSON for this token. + + + The indented JSON for this token. + + + + + Returns the JSON for this token using the given formatting and converters. + + Indicates how the output is formatted. + A collection of which will be used when writing the token. + The JSON for this token using the given formatting and converters. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to []. + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from [] to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Creates an for this token. + + An that can be used to read this token and its descendants. + + + + Creates a from an object. + + The object that will be used to create . + A with the value of the specified object + + + + Creates a from an object using the specified . + + The object that will be used to create . + The that will be used when reading the object. + A with the value of the specified object + + + + Creates the specified .NET type from the . + + The object type that the token will be deserialized to. + The new object created from the JSON value. + + + + Creates the specified .NET type from the . + + The object type that the token will be deserialized to. + The new object created from the JSON value. + + + + Creates the specified .NET type from the using the specified . + + The object type that the token will be deserialized to. + The that will be used when creating the object. + The new object created from the JSON value. + + + + Creates the specified .NET type from the using the specified . + + The object type that the token will be deserialized to. + The that will be used when creating the object. + The new object created from the JSON value. + + + + Creates a from a . + + An positioned at the token to read into this . + + An that contains the token and its descendant tokens + that were read from the reader. The runtime type of the token is determined + by the token type of the first token encountered in the reader. + + + + + Load a from a string that contains JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + Creates a from a . + + An positioned at the token to read into this . + + An that contains the token and its descendant tokens + that were read from the reader. The runtime type of the token is determined + by the token type of the first token encountered in the reader. + + + + + Selects a using a JPath expression. Selects the token that matches the object path. + + + A that contains a JPath expression. + + A , or null. + + + + Selects a using a JPath expression. Selects the token that matches the object path. + + + A that contains a JPath expression. + + A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. + A . + + + + Selects a collection of elements using a JPath expression. + + + A that contains a JPath expression. + + An that contains the selected elements. + + + + Selects a collection of elements using a JPath expression. + + + A that contains a JPath expression. + + A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. + An that contains the selected elements. + + + + Creates a new instance of the . All child tokens are recursively cloned. + + A new instance of the . + + + + Adds an object to the annotation list of this . + + The annotation to add. + + + + Get the first annotation object of the specified type from this . + + The type of the annotation to retrieve. + The first annotation object that matches the specified type, or null if no annotation is of the specified type. + + + + Gets the first annotation object of the specified type from this . + + The of the annotation to retrieve. + The first annotation object that matches the specified type, or null if no annotation is of the specified type. + + + + Gets a collection of annotations of the specified type for this . + + The type of the annotations to retrieve. + An that contains the annotations for this . + + + + Gets a collection of annotations of the specified type for this . + + The of the annotations to retrieve. + An of that contains the annotations that match the specified type for this . + + + + Removes the annotations of the specified type from this . + + The type of annotations to remove. + + + + Removes the annotations of the specified type from this . + + The of annotations to remove. + + + + Gets a comparer that can compare two tokens for value equality. + + A that can compare two nodes for value equality. + + + + Gets or sets the parent. + + The parent. + + + + Gets the root of this . + + The root of this . + + + + Gets the node type for this . + + The type. + + + + Gets a value indicating whether this token has child tokens. + + + true if this token has child values; otherwise, false. + + + + + Gets the next sibling token of this node. + + The that contains the next sibling token. + + + + Gets the previous sibling token of this node. + + The that contains the previous sibling token. + + + + Gets the path of the JSON token. + + + + + Gets the with the specified key. + + The with the specified key. + + + + Get the first child token of this token. + + A containing the first child token of the . + + + + Get the last child token of this token. + + A containing the last child token of the . + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Creates a comment with the given value. + + The value. + A comment with the given value. + + + + Creates a string with the given value. + + The value. + A string with the given value. + + + + Creates a null value. + + A null value. + + + + Creates a null value. + + A null value. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Indicates whether the current object is equal to another object of the same type. + + + true if the current object is equal to the parameter; otherwise, false. + + An object to compare with this object. + + + + Determines whether the specified is equal to the current . + + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + + The parameter is null. + + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The format. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The format provider. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The format. + The format provider. + + A that represents this instance. + + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings: + Value + Meaning + Less than zero + This instance is less than . + Zero + This instance is equal to . + Greater than zero + This instance is greater than . + + + is not the same type as this instance. + + + + + Gets a value indicating whether this token has child tokens. + + + true if this token has child values; otherwise, false. + + + + + Gets the node type for this . + + The type. + + + + Gets or sets the underlying token value. + + The underlying token value. + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class. + + The raw json. + + + + Creates an instance of with the content of the reader's current token. + + The reader. + An instance of with the content of the reader's current token. + + + + Indicating whether a property is required. + + + + + The property is not required. The default state. + + + + + The property must be defined in JSON but can be a null value. + + + + + The property must be defined in JSON and cannot be a null value. + + + + + Used to resolve references when serializing and deserializing JSON by the . + + + + + Resolves a reference to its object. + + The serialization context. + The reference to resolve. + The object that + + + + Gets the reference for the sepecified object. + + The serialization context. + The object to get a reference for. + The reference to the object. + + + + Determines whether the specified object is referenced. + + The serialization context. + The object to test for a reference. + + true if the specified object is referenced; otherwise, false. + + + + + Adds a reference to the specified object. + + The serialization context. + The reference. + The object to reference. + + + + Specifies reference handling options for the . + Note that references cannot be preserved when a value is set via a non-default constructor such as types that implement ISerializable. + + + + + + + + Do not preserve references when serializing types. + + + + + Preserve references when serializing into a JSON object structure. + + + + + Preserve references when serializing into a JSON array structure. + + + + + Preserve references when serializing. + + + + + Instructs the how to serialize the collection. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with a flag indicating whether the array can contain null items + + A flag indicating whether the array can contain null items. + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + Gets or sets a value indicating whether null items are allowed in the collection. + + true if null items are allowed in the collection; otherwise, false. + + + + Specifies default value handling options for the . + + + + + + + + + Include members where the member value is the same as the member's default value when serializing objects. + Included members are written to JSON. Has no effect when deserializing. + + + + + Ignore members where the member value is the same as the member's default value when serializing objects + so that is is not written to JSON. + This option will ignore all default values (e.g. null for objects and nullable types; 0 for integers, + decimals and floating point numbers; and false for booleans). The default value ignored can be changed by + placing the on the property. + + + + + Members with a default value but no JSON will be set to their default value when deserializing. + + + + + Ignore members where the member value is the same as the member's default value when serializing objects + and sets members to their default value when deserializing. + + + + + Instructs the to use the specified when serializing the member or class. + + + + + Initializes a new instance of the class. + + Type of the converter. + + + + Initializes a new instance of the class. + + Type of the converter. + Parameter list to use when constructing the JsonConverter. Can be null. + + + + Gets the of the converter. + + The of the converter. + + + + The parameter list to use when constructing the JsonConverter described by ConverterType. + If null, the default constructor is used. + + + + + Instructs the how to serialize the object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified member serialization. + + The member serialization. + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + Gets or sets the member serialization. + + The member serialization. + + + + Gets or sets a value that indicates whether the object's properties are required. + + + A value indicating whether the object's properties are required. + + + + + Specifies the settings on a object. + + + + + Initializes a new instance of the class. + + + + + Gets or sets how reference loops (e.g. a class referencing itself) is handled. + + Reference loop handling. + + + + Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. + + Missing member handling. + + + + Gets or sets how objects are created during deserialization. + + The object creation handling. + + + + Gets or sets how null values are handled during serialization and deserialization. + + Null value handling. + + + + Gets or sets how null default are handled during serialization and deserialization. + + The default value handling. + + + + Gets or sets a collection that will be used during serialization. + + The converters. + + + + Gets or sets how object references are preserved by the serializer. + + The preserve references handling. + + + + Gets or sets how type name writing and reading is handled by the serializer. + + The type name handling. + + + + Gets or sets how metadata properties are used during deserialization. + + The metadata properties handling. + + + + Gets or sets how a type name assembly is written and resolved by the serializer. + + The type name assembly format. + + + + Gets or sets how constructors are used during deserialization. + + The constructor handling. + + + + Gets or sets the contract resolver used by the serializer when + serializing .NET objects to JSON and vice versa. + + The contract resolver. + + + + Gets or sets the equality comparer used by the serializer when comparing references. + + The equality comparer. + + + + Gets or sets the used by the serializer when resolving references. + + The reference resolver. + + + + Gets or sets a function that creates the used by the serializer when resolving references. + + A function that creates the used by the serializer when resolving references. + + + + Gets or sets the used by the serializer when writing trace messages. + + The trace writer. + + + + Gets or sets the used by the serializer when resolving type names. + + The binder. + + + + Gets or sets the error handler called during serialization and deserialization. + + The error handler called during serialization and deserialization. + + + + Gets or sets the used by the serializer when invoking serialization callback methods. + + The context. + + + + Get or set how and values are formatted when writing JSON text, and the expected date format when reading JSON text. + + + + + Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + + + + + Indicates how JSON text output is formatted. + + + + + Get or set how dates are written to JSON text. + + + + + Get or set how time zones are handling during serialization and deserialization. + + + + + Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. + + + + + Get or set how special floating point numbers, e.g. , + and , + are written as JSON. + + + + + Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Get or set how strings are escaped when writing JSON text. + + + + + Gets or sets the culture used when reading JSON. Defaults to . + + + + + Gets a value indicating whether there will be a check for additional content after deserializing an object. + + + true if there will be a check for additional content after deserializing an object; otherwise, false. + + + + + + Represents a reader that provides validation. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Initializes a new instance of the class that + validates the content returned from the given . + + The to read from while validating. + + + + Reads the next JSON token from the stream as a . + + A . + + + + Reads the next JSON token from the stream as a []. + + + A [] or a null reference if the next JSON token is null. + + + + + Reads the next JSON token from the stream as a . + + A . + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Sets an event handler for receiving schema validation errors. + + + + + Gets the text value of the current JSON token. + + + + + + Gets the depth of the current token in the JSON document. + + The depth of the current token in the JSON document. + + + + Gets the path of the current JSON token. + + + + + Gets the quotation mark character used to enclose the value of a string. + + + + + + Gets the type of the current JSON token. + + + + + + Gets the Common Language Runtime (CLR) type for the current JSON token. + + + + + + Gets or sets the schema. + + The schema. + + + + Gets the used to construct this . + + The specified in the constructor. + + + + Compares tokens to determine whether they are equal. + + + + + Determines whether the specified objects are equal. + + The first object of type to compare. + The second object of type to compare. + + true if the specified objects are equal; otherwise, false. + + + + + Returns a hash code for the specified object. + + The for which a hash code is to be returned. + A hash code for the specified object. + The type of is a reference type and is null. + + + + Specifies the member serialization options for the . + + + + + All public members are serialized by default. Members can be excluded using or . + This is the default member serialization mode. + + + + + Only members must be marked with or are serialized. + This member serialization mode can also be set by marking the class with . + + + + + All public and private fields are serialized. Members can be excluded using or . + This member serialization mode can also be set by marking the class with + and setting IgnoreSerializableAttribute on to false. + + + + + Specifies how object creation is handled by the . + + + + + Reuse existing objects, create new objects when needed. + + + + + Only reuse existing objects. + + + + + Always create new objects. + + + + + Converts a to and from the ISO 8601 date format (e.g. 2008-04-12T12:53Z). + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Gets or sets the date time styles used when converting a date to and from JSON. + + The date time styles used when converting a date to and from JSON. + + + + Gets or sets the date time format used when converting a date to and from JSON. + + The date time format used when converting a date to and from JSON. + + + + Gets or sets the culture used when converting a date to and from JSON. + + The culture used when converting a date to and from JSON. + + + + Converts a to and from a JavaScript date constructor (e.g. new Date(52231943)). + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing property value of the JSON that is being converted. + The calling serializer. + The object value. + + + + Converts XML to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The calling serializer. + The value. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Checks if the attributeName is a namespace attribute. + + Attribute name to test. + The attribute name prefix if it has one, otherwise an empty string. + True if attribute name is for a namespace attribute, otherwise false. + + + + Determines whether this instance can convert the specified value type. + + Type of the value. + + true if this instance can convert the specified value type; otherwise, false. + + + + + Gets or sets the name of the root element to insert when deserializing to XML if the JSON structure has produces multiple root elements. + + The name of the deserialize root element. + + + + Gets or sets a flag to indicate whether to write the Json.NET array attribute. + This attribute helps preserve arrays when converting the written XML back to JSON. + + true if the array attibute is written to the XML; otherwise, false. + + + + Gets or sets a value indicating whether to write the root JSON object. + + true if the JSON root object is omitted; otherwise, false. + + + + Represents a reader that provides fast, non-cached, forward-only access to JSON text data. + + + + + Initializes a new instance of the class with the specified . + + The TextReader containing the XML data to read. + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Reads the next JSON token from the stream as a []. + + + A [] or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Changes the state to closed. + + + + + Gets a value indicating whether the class can return line information. + + + true if LineNumber and LinePosition can be provided; otherwise, false. + + + + + Gets the current line number. + + + The current line number or 0 if no line information is available (for example, HasLineInfo returns false). + + + + + Gets the current line position. + + + The current line position or 0 if no line information is available (for example, HasLineInfo returns false). + + + + + Instructs the to always serialize the member with the specified name. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified name. + + Name of the property. + + + + Gets or sets the converter used when serializing the property's collection items. + + The collection's items converter. + + + + The parameter list to use when constructing the JsonConverter described by ItemConverterType. + If null, the default constructor is used. + When non-null, there must be a constructor defined in the JsonConverter that exactly matches the number, + order, and type of these parameters. + + + [JsonProperty(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })] + + + + + Gets or sets the null value handling used when serializing this property. + + The null value handling. + + + + Gets or sets the default value handling used when serializing this property. + + The default value handling. + + + + Gets or sets the reference loop handling used when serializing this property. + + The reference loop handling. + + + + Gets or sets the object creation handling used when deserializing this property. + + The object creation handling. + + + + Gets or sets the type name handling used when serializing this property. + + The type name handling. + + + + Gets or sets whether this property's value is serialized as a reference. + + Whether this property's value is serialized as a reference. + + + + Gets or sets the order of serialization and deserialization of a member. + + The numeric order of serialization or deserialization. + + + + Gets or sets a value indicating whether this property is required. + + + A value indicating whether this property is required. + + + + + Gets or sets the name of the property. + + The name of the property. + + + + Gets or sets the the reference loop handling used when serializing the property's collection items. + + The collection's items reference loop handling. + + + + Gets or sets the the type name handling used when serializing the property's collection items. + + The collection's items type name handling. + + + + Gets or sets whether this property's collection items are serialized as a reference. + + Whether this property's collection items are serialized as a reference. + + + + Instructs the not to serialize the public field or public read/write property value. + + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Creates an instance of the JsonWriter class using the specified . + + The TextWriter to write to. + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Closes this stream and the underlying stream. + + + + + Writes the beginning of a JSON object. + + + + + Writes the beginning of a JSON array. + + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes the specified end token. + + The end token to write. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + A flag to indicate whether the text should be escaped when it is written as a JSON property name. + + + + Writes indent characters. + + + + + Writes the JSON value delimiter. + + + + + Writes an indent space. + + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes raw JSON. + + The raw JSON to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes out the given white space. + + The string of white space characters. + + + + Gets or sets how many IndentChars to write for each level in the hierarchy when is set to Formatting.Indented. + + + + + Gets or sets which character to use to quote attribute values. + + + + + Gets or sets which character to use for indenting when is set to Formatting.Indented. + + + + + Gets or sets a value indicating whether object names will be surrounded with quotes. + + + + + The exception thrown when an error occurs while reading JSON text. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Gets the path to the JSON where the error occurred. + + The path to the JSON where the error occurred. + + + + The exception thrown when an error occurs while reading JSON text. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Gets the line number indicating where the error occurred. + + The line number indicating where the error occurred. + + + + Gets the line position indicating where the error occurred. + + The line position indicating where the error occurred. + + + + Gets the path to the JSON where the error occurred. + + The path to the JSON where the error occurred. + + + + Represents a collection of . + + + + + Provides methods for converting between common language runtime types and JSON types. + + + + + + + + Represents JavaScript's boolean value true as a string. This field is read-only. + + + + + Represents JavaScript's boolean value false as a string. This field is read-only. + + + + + Represents JavaScript's null as a string. This field is read-only. + + + + + Represents JavaScript's undefined as a string. This field is read-only. + + + + + Represents JavaScript's positive infinity as a string. This field is read-only. + + + + + Represents JavaScript's negative infinity as a string. This field is read-only. + + + + + Represents JavaScript's NaN as a string. This field is read-only. + + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation using the specified. + + The value to convert. + The format the date will be converted to. + The time zone handling when the date is converted to a string. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + The string delimiter character. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + The string delimiter character. + The string escape handling. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Serializes the specified object to a JSON string. + + The object to serialize. + A JSON string representation of the object. + + + + Serializes the specified object to a JSON string using formatting. + + The object to serialize. + Indicates how the output is formatted. + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using a collection of . + + The object to serialize. + A collection converters used while serializing. + A JSON string representation of the object. + + + + Serializes the specified object to a JSON string using formatting and a collection of . + + The object to serialize. + Indicates how the output is formatted. + A collection converters used while serializing. + A JSON string representation of the object. + + + + Serializes the specified object to a JSON string using . + + The object to serialize. + The used to serialize the object. + If this is null, default serialization settings will be used. + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using a type, formatting and . + + The object to serialize. + The used to serialize the object. + If this is null, default serialization settings will be used. + + The type of the value being serialized. + This parameter is used when is Auto to write out the type name if the type of the value does not match. + Specifing the type is optional. + + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using formatting and . + + The object to serialize. + Indicates how the output is formatted. + The used to serialize the object. + If this is null, default serialization settings will be used. + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using a type, formatting and . + + The object to serialize. + Indicates how the output is formatted. + The used to serialize the object. + If this is null, default serialization settings will be used. + + The type of the value being serialized. + This parameter is used when is Auto to write out the type name if the type of the value does not match. + Specifing the type is optional. + + + A JSON string representation of the object. + + + + + Deserializes the JSON to a .NET object. + + The JSON to deserialize. + The deserialized object from the JSON string. + + + + Deserializes the JSON to a .NET object using . + + The JSON to deserialize. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type. + + The JSON to deserialize. + The of object being deserialized. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type. + + The type of the object to deserialize to. + The JSON to deserialize. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the given anonymous type. + + + The anonymous type to deserialize to. This can't be specified + traditionally and must be infered from the anonymous type passed + as a parameter. + + The JSON to deserialize. + The anonymous type object. + The deserialized anonymous type from the JSON string. + + + + Deserializes the JSON to the given anonymous type using . + + + The anonymous type to deserialize to. This can't be specified + traditionally and must be infered from the anonymous type passed + as a parameter. + + The JSON to deserialize. + The anonymous type object. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized anonymous type from the JSON string. + + + + Deserializes the JSON to the specified .NET type using a collection of . + + The type of the object to deserialize to. + The JSON to deserialize. + Converters to use while deserializing. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type using . + + The type of the object to deserialize to. + The object to deserialize. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type using a collection of . + + The JSON to deserialize. + The type of the object to deserialize. + Converters to use while deserializing. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type using . + + The JSON to deserialize. + The type of the object to deserialize to. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized object from the JSON string. + + + + Populates the object with values from the JSON string. + + The JSON to populate values from. + The target object to populate values onto. + + + + Populates the object with values from the JSON string using . + + The JSON to populate values from. + The target object to populate values onto. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + + + + Serializes the XML node to a JSON string. + + The node to serialize. + A JSON string of the XmlNode. + + + + Serializes the XML node to a JSON string using formatting. + + The node to serialize. + Indicates how the output is formatted. + A JSON string of the XmlNode. + + + + Serializes the XML node to a JSON string using formatting and omits the root object if is true. + + The node to serialize. + Indicates how the output is formatted. + Omits writing the root object. + A JSON string of the XmlNode. + + + + Deserializes the XmlNode from a JSON string. + + The JSON string. + The deserialized XmlNode + + + + Deserializes the XmlNode from a JSON string nested in a root elment specified by . + + The JSON string. + The name of the root element to append when deserializing. + The deserialized XmlNode + + + + Deserializes the XmlNode from a JSON string nested in a root elment specified by + and writes a .NET array attribute for collections. + + The JSON string. + The name of the root element to append when deserializing. + + A flag to indicate whether to write the Json.NET array attribute. + This attribute helps preserve arrays when converting the written XML back to JSON. + + The deserialized XmlNode + + + + Gets or sets a function that creates default . + Default settings are automatically used by serialization methods on , + and and on . + To serialize without using any default settings create a with + . + + + + + The exception thrown when an error occurs during JSON serialization or deserialization. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Serializes and deserializes objects into and from the JSON format. + The enables you to control how objects are encoded into JSON. + + + + + Initializes a new instance of the class. + + + + + Creates a new instance. + The will not use default settings. + + + A new instance. + The will not use default settings. + + + + + Creates a new instance using the specified . + The will not use default settings. + + The settings to be applied to the . + + A new instance using the specified . + The will not use default settings. + + + + + Creates a new instance. + The will use default settings. + + + A new instance. + The will use default settings. + + + + + Creates a new instance using the specified . + The will use default settings. + + The settings to be applied to the . + + A new instance using the specified . + The will use default settings. + + + + + Populates the JSON values onto the target object. + + The that contains the JSON structure to reader values from. + The target object to populate values onto. + + + + Populates the JSON values onto the target object. + + The that contains the JSON structure to reader values from. + The target object to populate values onto. + + + + Deserializes the JSON structure contained by the specified . + + The that contains the JSON structure to deserialize. + The being deserialized. + + + + Deserializes the JSON structure contained by the specified + into an instance of the specified type. + + The containing the object. + The of object being deserialized. + The instance of being deserialized. + + + + Deserializes the JSON structure contained by the specified + into an instance of the specified type. + + The containing the object. + The type of the object to deserialize. + The instance of being deserialized. + + + + Deserializes the JSON structure contained by the specified + into an instance of the specified type. + + The containing the object. + The of object being deserialized. + The instance of being deserialized. + + + + Serializes the specified and writes the JSON structure + to a Stream using the specified . + + The used to write the JSON structure. + The to serialize. + + + + Serializes the specified and writes the JSON structure + to a Stream using the specified . + + The used to write the JSON structure. + The to serialize. + + The type of the value being serialized. + This parameter is used when is Auto to write out the type name if the type of the value does not match. + Specifing the type is optional. + + + + + Serializes the specified and writes the JSON structure + to a Stream using the specified . + + The used to write the JSON structure. + The to serialize. + + The type of the value being serialized. + This parameter is used when is Auto to write out the type name if the type of the value does not match. + Specifing the type is optional. + + + + + Serializes the specified and writes the JSON structure + to a Stream using the specified . + + The used to write the JSON structure. + The to serialize. + + + + Occurs when the errors during serialization and deserialization. + + + + + Gets or sets the used by the serializer when resolving references. + + + + + Gets or sets the used by the serializer when resolving type names. + + + + + Gets or sets the used by the serializer when writing trace messages. + + The trace writer. + + + + Gets or sets the equality comparer used by the serializer when comparing references. + + The equality comparer. + + + + Gets or sets how type name writing and reading is handled by the serializer. + + + + + Gets or sets how a type name assembly is written and resolved by the serializer. + + The type name assembly format. + + + + Gets or sets how object references are preserved by the serializer. + + + + + Get or set how reference loops (e.g. a class referencing itself) is handled. + + + + + Get or set how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. + + + + + Get or set how null values are handled during serialization and deserialization. + + + + + Get or set how null default are handled during serialization and deserialization. + + + + + Gets or sets how objects are created during deserialization. + + The object creation handling. + + + + Gets or sets how constructors are used during deserialization. + + The constructor handling. + + + + Gets or sets how metadata properties are used during deserialization. + + The metadata properties handling. + + + + Gets a collection that will be used during serialization. + + Collection that will be used during serialization. + + + + Gets or sets the contract resolver used by the serializer when + serializing .NET objects to JSON and vice versa. + + + + + Gets or sets the used by the serializer when invoking serialization callback methods. + + The context. + + + + Indicates how JSON text output is formatted. + + + + + Get or set how dates are written to JSON text. + + + + + Get or set how time zones are handling during serialization and deserialization. + + + + + Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. + + + + + Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Get or set how special floating point numbers, e.g. , + and , + are written as JSON text. + + + + + Get or set how strings are escaped when writing JSON text. + + + + + Get or set how and values are formatted when writing JSON text, and the expected date format when reading JSON text. + + + + + Gets or sets the culture used when reading JSON. Defaults to . + + + + + Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + + + + + Gets a value indicating whether there will be a check for additional JSON content after deserializing an object. + + + true if there will be a check for additional JSON content after deserializing an object; otherwise, false. + + + + + Contains the LINQ to JSON extension methods. + + + + + Returns a collection of tokens that contains the ancestors of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains the ancestors of every token in the source collection. + + + + Returns a collection of tokens that contains every token in the source collection, and the ancestors of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains every token in the source collection, the ancestors of every token in the source collection. + + + + Returns a collection of tokens that contains the descendants of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains the descendants of every token in the source collection. + + + + Returns a collection of tokens that contains every token in the source collection, and the descendants of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains every token in the source collection, and the descendants of every token in the source collection. + + + + Returns a collection of child properties of every object in the source collection. + + An of that contains the source collection. + An of that contains the properties of every object in the source collection. + + + + Returns a collection of child values of every object in the source collection with the given key. + + An of that contains the source collection. + The token key. + An of that contains the values of every token in the source collection with the given key. + + + + Returns a collection of child values of every object in the source collection. + + An of that contains the source collection. + An of that contains the values of every token in the source collection. + + + + Returns a collection of converted child values of every object in the source collection with the given key. + + The type to convert the values to. + An of that contains the source collection. + The token key. + An that contains the converted values of every token in the source collection with the given key. + + + + Returns a collection of converted child values of every object in the source collection. + + The type to convert the values to. + An of that contains the source collection. + An that contains the converted values of every token in the source collection. + + + + Converts the value. + + The type to convert the value to. + A cast as a of . + A converted value. + + + + Converts the value. + + The source collection type. + The type to convert the value to. + A cast as a of . + A converted value. + + + + Returns a collection of child tokens of every array in the source collection. + + The source collection type. + An of that contains the source collection. + An of that contains the values of every token in the source collection. + + + + Returns a collection of converted child tokens of every array in the source collection. + + An of that contains the source collection. + The type to convert the values to. + The source collection type. + An that contains the converted values of every token in the source collection. + + + + Returns the input typed as . + + An of that contains the source collection. + The input typed as . + + + + Returns the input typed as . + + The source collection type. + An of that contains the source collection. + The input typed as . + + + + Represents a JSON constructor. + + + + + Represents a token that can contain other tokens. + + + + + Raises the event. + + The instance containing the event data. + + + + Raises the event. + + The instance containing the event data. + + + + Returns a collection of the child tokens of this token, in document order. + + + An of containing the child tokens of this , in document order. + + + + + Returns a collection of the child values of this token, in document order. + + The type to convert the values to. + + A containing the child values of this , in document order. + + + + + Returns a collection of the descendant tokens for this token in document order. + + An containing the descendant tokens of the . + + + + Returns a collection of the tokens that contain this token, and all descendant tokens of this token, in document order. + + An containing this token, and all the descendant tokens of the . + + + + Adds the specified content as children of this . + + The content to be added. + + + + Adds the specified content as the first children of this . + + The content to be added. + + + + Creates an that can be used to add tokens to the . + + An that is ready to have content written to it. + + + + Replaces the children nodes of this token with the specified content. + + The content. + + + + Removes the child nodes from this token. + + + + + Merge the specified content into this . + + The content to be merged. + + + + Merge the specified content into this using . + + The content to be merged. + The used to merge the content. + + + + Occurs when the list changes or an item in the list changes. + + + + + Occurs before an item is added to the collection. + + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets a value indicating whether this token has child tokens. + + + true if this token has child values; otherwise, false. + + + + + Get the first child token of this token. + + + A containing the first child token of the . + + + + + Get the last child token of this token. + + + A containing the last child token of the . + + + + + Gets the count of child JSON tokens. + + The count of child JSON tokens + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the specified name and content. + + The constructor name. + The contents of the constructor. + + + + Initializes a new instance of the class with the specified name and content. + + The constructor name. + The contents of the constructor. + + + + Initializes a new instance of the class with the specified name. + + The constructor name. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets or sets the name of this constructor. + + The constructor name. + + + + Gets the node type for this . + + The type. + + + + Gets the with the specified key. + + The with the specified key. + + + + Represents a collection of objects. + + The type of token + + + + An empty collection of objects. + + + + + Initializes a new instance of the struct. + + The enumerable. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Gets the with the specified key. + + + + + + Represents a JSON object. + + + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the specified content. + + The contents of the object. + + + + Initializes a new instance of the class with the specified content. + + The contents of the object. + + + + Gets an of this object's properties. + + An of this object's properties. + + + + Gets a the specified name. + + The property name. + A with the specified name or null. + + + + Gets an of this object's property values. + + An of this object's property values. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Load a from a string that contains JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + + + + Creates a from an object. + + The object that will be used to create . + A with the values of the specified object + + + + Creates a from an object. + + The object that will be used to create . + The that will be used to read the object. + A with the values of the specified object + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Gets the with the specified property name. + + Name of the property. + The with the specified property name. + + + + Gets the with the specified property name. + The exact property name will be searched for first and if no matching property is found then + the will be used to match a property. + + Name of the property. + One of the enumeration values that specifies how the strings will be compared. + The with the specified property name. + + + + Tries to get the with the specified property name. + The exact property name will be searched for first and if no matching property is found then + the will be used to match a property. + + Name of the property. + The value. + One of the enumeration values that specifies how the strings will be compared. + true if a value was successfully retrieved; otherwise, false. + + + + Adds the specified property name. + + Name of the property. + The value. + + + + Removes the property with the specified name. + + Name of the property. + true if item was successfully removed; otherwise, false. + + + + Tries the get value. + + Name of the property. + The value. + true if a value was successfully retrieved; otherwise, false. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Raises the event with the provided arguments. + + Name of the property. + + + + Returns the properties for this instance of a component. + + + A that represents the properties for this component instance. + + + + + Returns the properties for this instance of a component using the attribute array as a filter. + + An array of type that is used as a filter. + + A that represents the filtered properties for this component instance. + + + + + Returns a collection of custom attributes for this instance of a component. + + + An containing the attributes for this object. + + + + + Returns the class name of this instance of a component. + + + The class name of the object, or null if the class does not have a name. + + + + + Returns the name of this instance of a component. + + + The name of the object, or null if the object does not have a name. + + + + + Returns a type converter for this instance of a component. + + + A that is the converter for this object, or null if there is no for this object. + + + + + Returns the default event for this instance of a component. + + + An that represents the default event for this object, or null if this object does not have events. + + + + + Returns the default property for this instance of a component. + + + A that represents the default property for this object, or null if this object does not have properties. + + + + + Returns an editor of the specified type for this instance of a component. + + A that represents the editor for this object. + + An of the specified type that is the editor for this object, or null if the editor cannot be found. + + + + + Returns the events for this instance of a component using the specified attribute array as a filter. + + An array of type that is used as a filter. + + An that represents the filtered events for this component instance. + + + + + Returns the events for this instance of a component. + + + An that represents the events for this component instance. + + + + + Returns an object that contains the property described by the specified property descriptor. + + A that represents the property whose owner is to be found. + + An that represents the owner of the specified property. + + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Occurs when a property value changes. + + + + + Gets the node type for this . + + The type. + + + + Gets the with the specified key. + + The with the specified key. + + + + Gets or sets the with the specified property name. + + + + + + Represents a JSON array. + + + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the specified content. + + The contents of the array. + + + + Initializes a new instance of the class with the specified content. + + The contents of the array. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Load a from a string that contains JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + + + + Creates a from an object. + + The object that will be used to create . + A with the values of the specified object + + + + Creates a from an object. + + The object that will be used to create . + The that will be used to read the object. + A with the values of the specified object + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Inserts an item to the at the specified index. + + The zero-based index at which should be inserted. + The object to insert into the . + + is not a valid index in the . + The is read-only. + + + + Removes the item at the specified index. + + The zero-based index of the item to remove. + + is not a valid index in the . + The is read-only. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Adds an item to the . + + The object to add to the . + The is read-only. + + + + Removes all items from the . + + The is read-only. + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Copies to. + + The array. + Index of the array. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + The is read-only. + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets the node type for this . + + The type. + + + + Gets the with the specified key. + + The with the specified key. + + + + Gets or sets the at the specified index. + + + + + + Gets a value indicating whether the is read-only. + + true if the is read-only; otherwise, false. + + + + Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. + + + + + Initializes a new instance of the class. + + The token to read from. + + + + Reads the next JSON token from the stream as a []. + + + A [] or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Gets the at the reader's current position. + + + + + Gets the path of the current JSON token. + + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Initializes a new instance of the class writing to the given . + + The container being written to. + + + + Initializes a new instance of the class. + + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Closes this stream and the underlying stream. + + + + + Writes the beginning of a JSON object. + + + + + Writes the beginning of a JSON array. + + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes the end. + + The token. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes raw JSON. + + The raw JSON to write. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Gets the at the writer's current position. + + + + + Gets the token being writen. + + The token being writen. + + + + Represents a JSON property. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class. + + The property name. + The property content. + + + + Initializes a new instance of the class. + + The property name. + The property content. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets the property name. + + The property name. + + + + Gets or sets the property value. + + The property value. + + + + Gets the node type for this . + + The type. + + + + Specifies the type of token. + + + + + No token type has been set. + + + + + A JSON object. + + + + + A JSON array. + + + + + A JSON constructor. + + + + + A JSON object property. + + + + + A comment. + + + + + An integer value. + + + + + A float value. + + + + + A string value. + + + + + A boolean value. + + + + + A null value. + + + + + An undefined value. + + + + + A date value. + + + + + A raw JSON value. + + + + + A collection of bytes value. + + + + + A Guid value. + + + + + A Uri value. + + + + + A TimeSpan value. + + + + + + Contains the JSON schema extension methods. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + + Determines whether the is valid. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + + true if the specified is valid; otherwise, false. + + + + + + Determines whether the is valid. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + When this method returns, contains any error messages generated while validating. + + true if the specified is valid; otherwise, false. + + + + + + Validates the specified . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + + + + + Validates the specified . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + The validation event handler. + + + + + Returns detailed information about the schema exception. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Gets the line number indicating where the error occurred. + + The line number indicating where the error occurred. + + + + Gets the line position indicating where the error occurred. + + The line position indicating where the error occurred. + + + + Gets the path to the JSON where the error occurred. + + The path to the JSON where the error occurred. + + + + + Resolves from an id. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Initializes a new instance of the class. + + + + + Gets a for the specified reference. + + The id. + A for the specified reference. + + + + Gets or sets the loaded schemas. + + The loaded schemas. + + + + + Specifies undefined schema Id handling options for the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Do not infer a schema Id. + + + + + Use the .NET type name as the schema Id. + + + + + Use the assembly qualified .NET type name as the schema Id. + + + + + + Returns detailed information related to the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Gets the associated with the validation error. + + The JsonSchemaException associated with the validation error. + + + + Gets the path of the JSON location where the validation error occurred. + + The path of the JSON location where the validation error occurred. + + + + Gets the text description corresponding to the validation error. + + The text description. + + + + + Represents the callback method that will handle JSON schema validation events and the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Resolves member mappings for a type, camel casing property names. + + + + + Used by to resolves a for a given . + + + + + Used by to resolves a for a given . + + + + + + + + + Resolves the contract for a given type. + + The type to resolve a contract for. + The contract for a given type. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + If set to true the will use a cached shared with other resolvers of the same type. + Sharing the cache will significantly improve performance with multiple resolver instances because expensive reflection will only + happen once. This setting can cause unexpected behavior if different instances of the resolver are suppose to produce different + results. When set to false it is highly recommended to reuse instances with the . + + + + + Resolves the contract for a given type. + + The type to resolve a contract for. + The contract for a given type. + + + + Gets the serializable members for the type. + + The type to get serializable members for. + The serializable members for the type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates the constructor parameters. + + The constructor to create properties for. + The type's member properties. + Properties for the given . + + + + Creates a for the given . + + The matching member property. + The constructor parameter. + A created for the given . + + + + Resolves the default for the contract. + + Type of the object. + The contract's default . + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Determines which contract type is created for the given type. + + Type of the object. + A for the given type. + + + + Creates properties for the given . + + The type to create properties for. + /// The member serialization mode for the type. + Properties for the given . + + + + Creates the used by the serializer to get and set values from a member. + + The member. + The used by the serializer to get and set values from a member. + + + + Creates a for the given . + + The member's parent . + The member to create a for. + A created for the given . + + + + Resolves the name of the property. + + Name of the property. + Resolved name of the property. + + + + Resolves the key of the dictionary. By default is used to resolve dictionary keys. + + Key of the dictionary. + Resolved key of the dictionary. + + + + Gets the resolved name of the property. + + Name of the property. + Name of the property. + + + + Gets a value indicating whether members are being get and set using dynamic code generation. + This value is determined by the runtime permissions available. + + + true if using dynamic code generation; otherwise, false. + + + + + Gets or sets the default members search flags. + + The default members search flags. + + + + Gets or sets a value indicating whether compiler generated members should be serialized. + + + true if serialized compiler generated members; otherwise, false. + + + + + Gets or sets a value indicating whether to ignore the interface when serializing and deserializing types. + + + true if the interface will be ignored when serializing and deserializing types; otherwise, false. + + + + + Gets or sets a value indicating whether to ignore the attribute when serializing and deserializing types. + + + true if the attribute will be ignored when serializing and deserializing types; otherwise, false. + + + + + Initializes a new instance of the class. + + + + + Resolves the name of the property. + + Name of the property. + The property name camel cased. + + + + The default serialization binder used when resolving and loading classes from type names. + + + + + When overridden in a derived class, controls the binding of a serialized object to a type. + + Specifies the name of the serialized object. + Specifies the name of the serialized object. + + The type of the object the formatter creates a new instance of. + + + + + Get and set values for a using dynamic methods. + + + + + Provides methods to get and set values. + + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + Initializes a new instance of the class. + + The member info. + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + Provides information surrounding an error. + + + + + Gets the error. + + The error. + + + + Gets the original object that caused the error. + + The original object that caused the error. + + + + Gets the member that caused the error. + + The member that caused the error. + + + + Gets the path of the JSON location where the error occurred. + + The path of the JSON location where the error occurred. + + + + Gets or sets a value indicating whether this is handled. + + true if handled; otherwise, false. + + + + Provides data for the Error event. + + + + + Initializes a new instance of the class. + + The current object. + The error context. + + + + Gets the current object the error event is being raised against. + + The current object the error event is being raised against. + + + + Gets the error context. + + The error context. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets the of the collection items. + + The of the collection items. + + + + Gets a value indicating whether the collection type is a multidimensional array. + + true if the collection type is a multidimensional array; otherwise, false. + + + + Handles serialization callback events. + + The object that raised the callback event. + The streaming context. + + + + Handles serialization error callback events. + + The object that raised the callback event. + The streaming context. + The error context. + + + + Sets extension data for an object during deserialization. + + The object to set extension data on. + The extension data key. + The extension data value. + + + + Gets extension data for an object during serialization. + + The object to set extension data on. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets or sets the property name resolver. + + The property name resolver. + + + + Gets or sets the dictionary key resolver. + + The dictionary key resolver. + + + + Gets the of the dictionary keys. + + The of the dictionary keys. + + + + Gets the of the dictionary values. + + The of the dictionary values. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets or sets the ISerializable object constructor. + + The ISerializable object constructor. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Maps a JSON property to a .NET member or constructor parameter. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets or sets the name of the property. + + The name of the property. + + + + Gets or sets the type that declared this property. + + The type that declared this property. + + + + Gets or sets the order of serialization and deserialization of a member. + + The numeric order of serialization or deserialization. + + + + Gets or sets the name of the underlying member or parameter. + + The name of the underlying member or parameter. + + + + Gets the that will get and set the during serialization. + + The that will get and set the during serialization. + + + + Gets or sets the for this property. + + The for this property. + + + + Gets or sets the type of the property. + + The type of the property. + + + + Gets or sets the for the property. + If set this converter takes presidence over the contract converter for the property type. + + The converter. + + + + Gets or sets the member converter. + + The member converter. + + + + Gets or sets a value indicating whether this is ignored. + + true if ignored; otherwise, false. + + + + Gets or sets a value indicating whether this is readable. + + true if readable; otherwise, false. + + + + Gets or sets a value indicating whether this is writable. + + true if writable; otherwise, false. + + + + Gets or sets a value indicating whether this has a member attribute. + + true if has a member attribute; otherwise, false. + + + + Gets the default value. + + The default value. + + + + Gets or sets a value indicating whether this is required. + + A value indicating whether this is required. + + + + Gets or sets a value indicating whether this property preserves object references. + + + true if this instance is reference; otherwise, false. + + + + + Gets or sets the property null value handling. + + The null value handling. + + + + Gets or sets the property default value handling. + + The default value handling. + + + + Gets or sets the property reference loop handling. + + The reference loop handling. + + + + Gets or sets the property object creation handling. + + The object creation handling. + + + + Gets or sets or sets the type name handling. + + The type name handling. + + + + Gets or sets a predicate used to determine whether the property should be serialize. + + A predicate used to determine whether the property should be serialize. + + + + Gets or sets a predicate used to determine whether the property should be serialized. + + A predicate used to determine whether the property should be serialized. + + + + Gets or sets an action used to set whether the property has been deserialized. + + An action used to set whether the property has been deserialized. + + + + Gets or sets the converter used when serializing the property's collection items. + + The collection's items converter. + + + + Gets or sets whether this property's collection items are serialized as a reference. + + Whether this property's collection items are serialized as a reference. + + + + Gets or sets the the type name handling used when serializing the property's collection items. + + The collection's items type name handling. + + + + Gets or sets the the reference loop handling used when serializing the property's collection items. + + The collection's items reference loop handling. + + + + A collection of objects. + + + + + Initializes a new instance of the class. + + The type. + + + + When implemented in a derived class, extracts the key from the specified element. + + The element from which to extract the key. + The key for the specified element. + + + + Adds a object. + + The property to add to the collection. + + + + Gets the closest matching object. + First attempts to get an exact case match of propertyName and then + a case insensitive match. + + Name of the property. + A matching property if found. + + + + Gets a property by property name. + + The name of the property to get. + Type property name string comparison. + A matching property if found. + + + + Specifies missing member handling options for the . + + + + + Ignore a missing member and do not attempt to deserialize it. + + + + + Throw a when a missing member is encountered during deserialization. + + + + + Specifies null value handling options for the . + + + + + + + + + Include null values when serializing and deserializing objects. + + + + + Ignore null values when serializing and deserializing objects. + + + + + Specifies reference loop handling options for the . + + + + + Throw a when a loop is encountered. + + + + + Ignore loop references and do not serialize. + + + + + Serialize loop references. + + + + + + An in-memory representation of a JSON Schema. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Initializes a new instance of the class. + + + + + Reads a from the specified . + + The containing the JSON Schema to read. + The object representing the JSON Schema. + + + + Reads a from the specified . + + The containing the JSON Schema to read. + The to use when resolving schema references. + The object representing the JSON Schema. + + + + Load a from a string that contains schema JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + Parses the specified json. + + The json. + The resolver. + A populated from the string that contains JSON. + + + + Writes this schema to a . + + A into which this method will write. + + + + Writes this schema to a using the specified . + + A into which this method will write. + The resolver used. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets or sets the id. + + + + + Gets or sets the title. + + + + + Gets or sets whether the object is required. + + + + + Gets or sets whether the object is read only. + + + + + Gets or sets whether the object is visible to users. + + + + + Gets or sets whether the object is transient. + + + + + Gets or sets the description of the object. + + + + + Gets or sets the types of values allowed by the object. + + The type. + + + + Gets or sets the pattern. + + The pattern. + + + + Gets or sets the minimum length. + + The minimum length. + + + + Gets or sets the maximum length. + + The maximum length. + + + + Gets or sets a number that the value should be divisble by. + + A number that the value should be divisble by. + + + + Gets or sets the minimum. + + The minimum. + + + + Gets or sets the maximum. + + The maximum. + + + + Gets or sets a flag indicating whether the value can not equal the number defined by the "minimum" attribute. + + A flag indicating whether the value can not equal the number defined by the "minimum" attribute. + + + + Gets or sets a flag indicating whether the value can not equal the number defined by the "maximum" attribute. + + A flag indicating whether the value can not equal the number defined by the "maximum" attribute. + + + + Gets or sets the minimum number of items. + + The minimum number of items. + + + + Gets or sets the maximum number of items. + + The maximum number of items. + + + + Gets or sets the of items. + + The of items. + + + + Gets or sets a value indicating whether items in an array are validated using the instance at their array position from . + + + true if items are validated using their array position; otherwise, false. + + + + + Gets or sets the of additional items. + + The of additional items. + + + + Gets or sets a value indicating whether additional items are allowed. + + + true if additional items are allowed; otherwise, false. + + + + + Gets or sets whether the array items must be unique. + + + + + Gets or sets the of properties. + + The of properties. + + + + Gets or sets the of additional properties. + + The of additional properties. + + + + Gets or sets the pattern properties. + + The pattern properties. + + + + Gets or sets a value indicating whether additional properties are allowed. + + + true if additional properties are allowed; otherwise, false. + + + + + Gets or sets the required property if this property is present. + + The required property if this property is present. + + + + Gets or sets the a collection of valid enum values allowed. + + A collection of valid enum values allowed. + + + + Gets or sets disallowed types. + + The disallow types. + + + + Gets or sets the default value. + + The default value. + + + + Gets or sets the collection of that this schema extends. + + The collection of that this schema extends. + + + + Gets or sets the format. + + The format. + + + + + Generates a from a specified . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Generate a from the specified type. + + The type to generate a from. + A generated from the specified type. + + + + Generate a from the specified type. + + The type to generate a from. + The used to resolve schema references. + A generated from the specified type. + + + + Generate a from the specified type. + + The type to generate a from. + Specify whether the generated root will be nullable. + A generated from the specified type. + + + + Generate a from the specified type. + + The type to generate a from. + The used to resolve schema references. + Specify whether the generated root will be nullable. + A generated from the specified type. + + + + Gets or sets how undefined schemas are handled by the serializer. + + + + + Gets or sets the contract resolver. + + The contract resolver. + + + + + The value types allowed by the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + No type specified. + + + + + String type. + + + + + Float type. + + + + + Integer type. + + + + + Boolean type. + + + + + Object type. + + + + + Array type. + + + + + Null type. + + + + + Any type. + + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets or sets the object member serialization. + + The member object serialization. + + + + Gets or sets a value that indicates whether the object's properties are required. + + + A value indicating whether the object's properties are required. + + + + + Gets the object's properties. + + The object's properties. + + + + Gets the constructor parameters required for any non-default constructor + + + + + Gets a collection of instances that define the parameters used with . + + + + + Gets or sets the override constructor used to create the object. + This is set when a constructor is marked up using the + JsonConstructor attribute. + + The override constructor. + + + + Gets or sets the parametrized constructor used to create the object. + + The parametrized constructor. + + + + Gets or sets the function used to create the object. When set this function will override . + This function is called with a collection of arguments which are defined by the collection. + + The function used to create the object. + + + + Gets or sets the extension data setter. + + + + + Gets or sets the extension data getter. + + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Lookup and create an instance of the JsonConverter type described by the argument. + + The JsonConverter type to create. + Optional arguments to pass to an initializing constructor of the JsonConverter. + If null, the default constructor is used. + + + + Create a factory function that can be used to create instances of a JsonConverter described by the + argument type. The returned function can then be used to either invoke the converter's default ctor, or any + parameterized constructors by way of an object array. + + + + + Represents a method that constructs an object. + + The object type to create. + + + + When applied to a method, specifies that the method is called when an error occurs serializing an object. + + + + + Get and set values for a using reflection. + + + + + Initializes a new instance of the class. + + The member info. + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + Specifies type name handling options for the . + + + + + Do not include the .NET type name when serializing types. + + + + + Include the .NET type name when serializing into a JSON object structure. + + + + + Include the .NET type name when serializing into a JSON array structure. + + + + + Always include the .NET type name when serializing. + + + + + Include the .NET type name when the type of the object being serialized is not the same as its declared type. + + + + + Converts the value to the specified type. If the value is unable to be converted, the + value is checked whether it assignable to the specified type. + + The value to convert. + The culture to use when converting. + The type to convert or cast the value to. + + The converted type. If conversion was unsuccessful, the initial value + is returned if assignable to the target type. + + + + + Gets a dictionary of the names and values of an Enum type. + + + + + + Gets a dictionary of the names and values of an Enum type. + + The enum type to get names and values for. + + + + + Specifies the type of JSON token. + + + + + This is returned by the if a method has not been called. + + + + + An object start token. + + + + + An array start token. + + + + + A constructor start token. + + + + + An object property name. + + + + + A comment. + + + + + Raw JSON. + + + + + An integer. + + + + + A float. + + + + + A string. + + + + + A boolean. + + + + + A null token. + + + + + An undefined token. + + + + + An object end token. + + + + + An array end token. + + + + + A constructor end token. + + + + + A Date. + + + + + Byte data. + + + + + Builds a string. Unlike StringBuilder this class lets you reuse it's internal buffer. + + + + + Determines whether the collection is null or empty. + + The collection. + + true if the collection is null or empty; otherwise, false. + + + + + Adds the elements of the specified collection to the specified generic IList. + + The list to add to. + The collection of elements to add. + + + + Returns the index of the first occurrence in a sequence by using a specified IEqualityComparer{TSource}. + + The type of the elements of source. + A sequence in which to locate a value. + The object to locate in the sequence + An equality comparer to compare values. + The zero-based index of the first occurrence of value within the entire sequence, if found; otherwise, –1. + + + + Gets the type of the typed collection's items. + + The type. + The type of the typed collection's items. + + + + Gets the member's underlying type. + + The member. + The underlying type of the member. + + + + Determines whether the member is an indexed property. + + The member. + + true if the member is an indexed property; otherwise, false. + + + + + Determines whether the property is an indexed property. + + The property. + + true if the property is an indexed property; otherwise, false. + + + + + Gets the member's value on the object. + + The member. + The target object. + The member's value on the object. + + + + Sets the member's value on the target object. + + The member. + The target. + The value. + + + + Determines whether the specified MemberInfo can be read. + + The MemberInfo to determine whether can be read. + /// if set to true then allow the member to be gotten non-publicly. + + true if the specified MemberInfo can be read; otherwise, false. + + + + + Determines whether the specified MemberInfo can be set. + + The MemberInfo to determine whether can be set. + if set to true then allow the member to be set non-publicly. + if set to true then allow the member to be set if read-only. + + true if the specified MemberInfo can be set; otherwise, false. + + + + + Determines whether the string is all white space. Empty string will return false. + + The string to test whether it is all white space. + + true if the string is all white space; otherwise, false. + + + + + Nulls an empty string. + + The string. + Null if the string was null, otherwise the string unchanged. + + + + Specifies the state of the . + + + + + An exception has been thrown, which has left the in an invalid state. + You may call the method to put the in the Closed state. + Any other method calls results in an being thrown. + + + + + The method has been called. + + + + + An object is being written. + + + + + A array is being written. + + + + + A constructor is being written. + + + + + A property is being written. + + + + + A write method has not been called. + + + + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net35/Newtonsoft.Json.dll b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net35/Newtonsoft.Json.dll new file mode 100644 index 00000000..5e8eb8ee Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net35/Newtonsoft.Json.dll differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net35/Newtonsoft.Json.pdb b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net35/Newtonsoft.Json.pdb new file mode 100644 index 00000000..7450de80 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net35/Newtonsoft.Json.pdb differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net35/Newtonsoft.Json.xml b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net35/Newtonsoft.Json.xml new file mode 100644 index 00000000..82fa7f0b --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net35/Newtonsoft.Json.xml @@ -0,0 +1,8582 @@ + + + + Newtonsoft.Json + + + + + Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. + + + + + Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. + + + + + Initializes a new instance of the class with the specified . + + + + + Reads the next JSON token from the stream. + + true if the next token was read successfully; false if there are no more tokens to read. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a []. + + A [] or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Skips the children of the current token. + + + + + Sets the current token. + + The new token. + + + + Sets the current token and value. + + The new token. + The value. + + + + Sets the state based on current token type. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Releases unmanaged and - optionally - managed resources + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Changes the to Closed. + + + + + Gets the current reader state. + + The current reader state. + + + + Gets or sets a value indicating whether the underlying stream or + should be closed when the reader is closed. + + + true to close the underlying stream or when + the reader is closed; otherwise false. The default is true. + + + + + Gets or sets a value indicating whether multiple pieces of JSON content can + be read from a continuous stream without erroring. + + + true to support reading multiple pieces of JSON content; otherwise false. The default is false. + + + + + Gets the quotation mark character used to enclose the value of a string. + + + + + Get or set how time zones are handling when reading JSON. + + + + + Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. + + + + + Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Get or set how custom date formatted strings are parsed when reading JSON. + + + + + Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + + + + + Gets the type of the current JSON token. + + + + + Gets the text value of the current JSON token. + + + + + Gets The Common Language Runtime (CLR) type for the current JSON token. + + + + + Gets the depth of the current token in the JSON document. + + The depth of the current token in the JSON document. + + + + Gets the path of the current JSON token. + + + + + Gets or sets the culture used when reading JSON. Defaults to . + + + + + Specifies the state of the reader. + + + + + The Read method has not been called. + + + + + The end of the file has been reached successfully. + + + + + Reader is at a property. + + + + + Reader is at the start of an object. + + + + + Reader is in an object. + + + + + Reader is at the start of an array. + + + + + Reader is in an array. + + + + + The Close method has been called. + + + + + Reader has just read a value. + + + + + Reader is at the start of a constructor. + + + + + Reader in a constructor. + + + + + An error occurred that prevents the read operation from continuing. + + + + + The end of the file has been reached successfully. + + + + + Initializes a new instance of the class. + + The stream. + + + + Initializes a new instance of the class. + + The reader. + + + + Initializes a new instance of the class. + + The stream. + if set to true the root object will be read as a JSON array. + The used when reading values from BSON. + + + + Initializes a new instance of the class. + + The reader. + if set to true the root object will be read as a JSON array. + The used when reading values from BSON. + + + + Reads the next JSON token from the stream as a []. + + + A [] or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + + A . This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Changes the to Closed. + + + + + Gets or sets a value indicating whether binary data reading should compatible with incorrect Json.NET 3.5 written binary. + + + true if binary data reading will be compatible with incorrect Json.NET 3.5 written binary; otherwise, false. + + + + + Gets or sets a value indicating whether the root object will be read as a JSON array. + + + true if the root object will be read as a JSON array; otherwise, false. + + + + + Gets or sets the used when reading values from BSON. + + The used when reading values from BSON. + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Creates an instance of the JsonWriter class. + + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Closes this stream and the underlying stream. + + + + + Writes the beginning of a JSON object. + + + + + Writes the end of a JSON object. + + + + + Writes the beginning of a JSON array. + + + + + Writes the end of an array. + + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes the end constructor. + + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + A flag to indicate whether the text should be escaped when it is written as a JSON property name. + + + + Writes the end of the current JSON object or array. + + + + + Writes the current token and its children. + + The to read the token from. + + + + Writes the current token. + + The to read the token from. + A flag indicating whether the current token's children should be written. + + + + Writes the token and its value. + + The to write. + + The value to write. + A value is only required for tokens that have an associated value, e.g. the property name for . + A null value can be passed to the method for token's that don't have a value, e.g. . + + + + Writes the token. + + The to write. + + + + Writes the specified end token. + + The end token to write. + + + + Writes indent characters. + + + + + Writes the JSON value delimiter. + + + + + Writes an indent space. + + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes raw JSON without changing the writer's state. + + The raw JSON to write. + + + + Writes raw JSON where a value is expected and updates the writer's state. + + The raw JSON to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes out the given white space. + + The string of white space characters. + + + + Sets the state of the JsonWriter, + + The JsonToken being written. + The value being written. + + + + Gets or sets a value indicating whether the underlying stream or + should be closed when the writer is closed. + + + true to close the underlying stream or when + the writer is closed; otherwise false. The default is true. + + + + + Gets the top. + + The top. + + + + Gets the state of the writer. + + + + + Gets the path of the writer. + + + + + Indicates how JSON text output is formatted. + + + + + Get or set how dates are written to JSON text. + + + + + Get or set how time zones are handling when writing JSON text. + + + + + Get or set how strings are escaped when writing JSON text. + + + + + Get or set how special floating point numbers, e.g. , + and , + are written to JSON text. + + + + + Get or set how and values are formatting when writing JSON text. + + + + + Gets or sets the culture used when writing JSON. Defaults to . + + + + + Initializes a new instance of the class. + + The stream. + + + + Initializes a new instance of the class. + + The writer. + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Writes the end. + + The token. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes raw JSON. + + The raw JSON to write. + + + + Writes raw JSON where a value is expected and updates the writer's state. + + The raw JSON to write. + + + + Writes the beginning of a JSON array. + + + + + Writes the beginning of a JSON object. + + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Closes this stream and the underlying stream. + + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value that represents a BSON object id. + + The Object ID value to write. + + + + Writes a BSON regex. + + The regex pattern. + The regex options. + + + + Gets or sets the used when writing values to BSON. + When set to no conversion will occur. + + The used when writing values to BSON. + + + + Represents a BSON Oid (object id). + + + + + Initializes a new instance of the class. + + The Oid value. + + + + Gets or sets the value of the Oid. + + The value of the Oid. + + + + Converts a binary value to and from a base 64 string value. + + + + + Converts an object to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + + Gets the of the JSON produced by the JsonConverter. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The of the JSON produced by the JsonConverter. + + + + Gets a value indicating whether this can read JSON. + + true if this can read JSON; otherwise, false. + + + + Gets a value indicating whether this can write JSON. + + true if this can write JSON; otherwise, false. + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts a to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified value type. + + Type of the value. + + true if this instance can convert the specified value type; otherwise, false. + + + + + Converts a to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified value type. + + Type of the value. + + true if this instance can convert the specified value type; otherwise, false. + + + + + Create a custom object + + The object type to convert. + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Creates an object which will then be populated by the serializer. + + Type of the object. + The created object. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Gets a value indicating whether this can write JSON. + + + true if this can write JSON; otherwise, false. + + + + + Provides a base class for converting a to and from JSON. + + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts an Entity Framework EntityKey to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts a to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts a to and from JSON and BSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts a to and from JSON and BSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts an to and from its name string value. + + + + + Initializes a new instance of the class. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Gets or sets a value indicating whether the written enum text should be camel case. + + true if the written enum text will be camel case; otherwise, false. + + + + Gets or sets a value indicating whether integer values are allowed. + + true if integers are allowed; otherwise, false. + + + + Specifies how constructors are used when initializing objects during deserialization by the . + + + + + First attempt to use the public default constructor, then fall back to single paramatized constructor, then the non-public default constructor. + + + + + Json.NET will use a non-public default constructor before falling back to a paramatized constructor. + + + + + Converts a to and from a string (e.g. "1.2.3.4"). + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing property value of the JSON that is being converted. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Specifies how dates are formatted when writing JSON text. + + + + + Dates are written in the ISO 8601 format, e.g. "2012-03-21T05:40Z". + + + + + Dates are written in the Microsoft JSON format, e.g. "\/Date(1198908717056)\/". + + + + + Specifies how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON text. + + + + + Date formatted strings are not parsed to a date type and are read as strings. + + + + + Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . + + + + + Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . + + + + + Specifies how to treat the time value when converting between string and . + + + + + Treat as local time. If the object represents a Coordinated Universal Time (UTC), it is converted to the local time. + + + + + Treat as a UTC. If the object represents a local time, it is converted to a UTC. + + + + + Treat as a local time if a is being converted to a string. + If a string is being converted to , convert to a local time if a time zone is specified. + + + + + Time zone information should be preserved when converting. + + + + + Specifies float format handling options when writing special floating point numbers, e.g. , + and with . + + + + + Write special floating point values as strings in JSON, e.g. "NaN", "Infinity", "-Infinity". + + + + + Write special floating point values as symbols in JSON, e.g. NaN, Infinity, -Infinity. + Note that this will produce non-valid JSON. + + + + + Write special floating point values as the property's default value in JSON, e.g. 0.0 for a property, null for a property. + + + + + Specifies how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Floating point numbers are parsed to . + + + + + Floating point numbers are parsed to . + + + + + Specifies formatting options for the . + + + + + No special formatting is applied. This is the default. + + + + + Causes child objects to be indented according to the and settings. + + + + + Instructs the to use the specified constructor when deserializing that object. + + + + + Instructs the how to serialize the collection. + + + + + Instructs the how to serialize the object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + Gets or sets the id. + + The id. + + + + Gets or sets the title. + + The title. + + + + Gets or sets the description. + + The description. + + + + Gets the collection's items converter. + + The collection's items converter. + + + + The parameter list to use when constructing the JsonConverter described by ItemConverterType. + If null, the default constructor is used. + When non-null, there must be a constructor defined in the JsonConverter that exactly matches the number, + order, and type of these parameters. + + + [JsonContainer(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })] + + + + + Gets or sets a value that indicates whether to preserve object references. + + + true to keep object reference; otherwise, false. The default is false. + + + + + Gets or sets a value that indicates whether to preserve collection's items references. + + + true to keep collection's items object references; otherwise, false. The default is false. + + + + + Gets or sets the reference loop handling used when serializing the collection's items. + + The reference loop handling. + + + + Gets or sets the type name handling used when serializing the collection's items. + + The type name handling. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + The exception thrown when an error occurs during JSON serialization or deserialization. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Instructs the to deserialize properties with no matching class member into the specified collection + and write values during serialization. + + + + + Initializes a new instance of the class. + + + + + Gets or sets a value that indicates whether to write extension data when serializing the object. + + + true to write extension data when serializing the object; otherwise, false. The default is true. + + + + + Gets or sets a value that indicates whether to read extension data when deserializing the object. + + + true to read extension data when deserializing the object; otherwise, false. The default is true. + + + + + Instructs the to always serialize the member, and require the member has a value. + + + + + Represents a view of a . + + + + + Initializes a new instance of the class. + + The name. + + + + When overridden in a derived class, returns whether resetting an object changes its value. + + + true if resetting the component changes its value; otherwise, false. + + The component to test for reset capability. + + + + + When overridden in a derived class, gets the current value of the property on a component. + + + The value of a property for a given component. + + The component with the property for which to retrieve the value. + + + + + When overridden in a derived class, resets the value for this property of the component to the default value. + + The component with the property value that is to be reset to the default value. + + + + + When overridden in a derived class, sets the value of the component to a different value. + + The component with the property value that is to be set. + The new value. + + + + + When overridden in a derived class, determines a value indicating whether the value of this property needs to be persisted. + + + true if the property should be persisted; otherwise, false. + + The component with the property to be examined for persistence. + + + + + When overridden in a derived class, gets the type of the component this property is bound to. + + + A that represents the type of component this property is bound to. When the or methods are invoked, the object specified might be an instance of this type. + + + + + When overridden in a derived class, gets a value indicating whether this property is read-only. + + + true if the property is read-only; otherwise, false. + + + + + When overridden in a derived class, gets the type of the property. + + + A that represents the type of the property. + + + + + Gets the hash code for the name of the member. + + + + The hash code for the name of the member. + + + + + Specifies the settings used when merging JSON. + + + + + Gets or sets the method used when merging JSON arrays. + + The method used when merging JSON arrays. + + + + Specifies how JSON arrays are merged together. + + + + Concatenate arrays. + + + Union arrays, skipping items that already exist. + + + Replace all array items. + + + Merge array items together, matched by index. + + + + Specifies metadata property handling options for the . + + + + + Read metadata properties located at the start of a JSON object. + + + + + Read metadata properties located anywhere in a JSON object. Note that this setting will impact performance. + + + + + Do not try to read metadata properties. + + + + + Represents a trace writer that writes to the application's instances. + + + + + Represents a trace writer. + + + + + Writes the specified trace level, message and optional exception. + + The at which to write this trace. + The trace message. + The trace exception. This parameter is optional. + + + + Gets the that will be used to filter the trace messages passed to the writer. + For example a filter level of Info will exclude Verbose messages and include Info, + Warning and Error messages. + + The that will be used to filter the trace messages passed to the writer. + + + + Writes the specified trace level, message and optional exception. + + The at which to write this trace. + The trace message. + The trace exception. This parameter is optional. + + + + Gets the that will be used to filter the trace messages passed to the writer. + For example a filter level of Info will exclude Verbose messages and include Info, + Warning and Error messages. + + + The that will be used to filter the trace messages passed to the writer. + + + + + Provides methods to get attributes. + + + + + Returns a collection of all of the attributes, or an empty collection if there are no attributes. + + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Returns a collection of attributes, identified by type, or an empty collection if there are no attributes. + + The type of the attributes. + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Contract details for a used by the . + + + + + Contract details for a used by the . + + + + + Gets the underlying type for the contract. + + The underlying type for the contract. + + + + Gets or sets the type created during deserialization. + + The type created during deserialization. + + + + Gets or sets whether this type contract is serialized as a reference. + + Whether this type contract is serialized as a reference. + + + + Gets or sets the default for this contract. + + The converter. + + + + Gets or sets all methods called immediately after deserialization of the object. + + The methods called immediately after deserialization of the object. + + + + Gets or sets all methods called during deserialization of the object. + + The methods called during deserialization of the object. + + + + Gets or sets all methods called after serialization of the object graph. + + The methods called after serialization of the object graph. + + + + Gets or sets all methods called before serialization of the object. + + The methods called before serialization of the object. + + + + Gets or sets all method called when an error is thrown during the serialization of the object. + + The methods called when an error is thrown during the serialization of the object. + + + + Gets or sets the method called immediately after deserialization of the object. + + The method called immediately after deserialization of the object. + + + + Gets or sets the method called during deserialization of the object. + + The method called during deserialization of the object. + + + + Gets or sets the method called after serialization of the object graph. + + The method called after serialization of the object graph. + + + + Gets or sets the method called before serialization of the object. + + The method called before serialization of the object. + + + + Gets or sets the method called when an error is thrown during the serialization of the object. + + The method called when an error is thrown during the serialization of the object. + + + + Gets or sets the default creator method used to create the object. + + The default creator method used to create the object. + + + + Gets or sets a value indicating whether the default creator is non public. + + true if the default object creator is non-public; otherwise, false. + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets or sets the default collection items . + + The converter. + + + + Gets or sets a value indicating whether the collection items preserve object references. + + true if collection items preserve object references; otherwise, false. + + + + Gets or sets the collection item reference loop handling. + + The reference loop handling. + + + + Gets or sets the collection item type name handling. + + The type name handling. + + + + Represents a trace writer that writes to memory. When the trace message limit is + reached then old trace messages will be removed as new messages are added. + + + + + Initializes a new instance of the class. + + + + + Writes the specified trace level, message and optional exception. + + The at which to write this trace. + The trace message. + The trace exception. This parameter is optional. + + + + Returns an enumeration of the most recent trace messages. + + An enumeration of the most recent trace messages. + + + + Returns a of the most recent trace messages. + + + A of the most recent trace messages. + + + + + Gets the that will be used to filter the trace messages passed to the writer. + For example a filter level of Info will exclude Verbose messages and include Info, + Warning and Error messages. + + + The that will be used to filter the trace messages passed to the writer. + + + + + Provides methods to get attributes from a , , or . + + + + + Initializes a new instance of the class. + + The instance to get attributes for. This parameter should be a , , or . + + + + Returns a collection of all of the attributes, or an empty collection if there are no attributes. + + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Returns a collection of attributes, identified by type, or an empty collection if there are no attributes. + + The type of the attributes. + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Provides an interface to enable a class to return line and position information. + + + + + Gets a value indicating whether the class can return line information. + + + true if LineNumber and LinePosition can be provided; otherwise, false. + + + + + Gets the current line number. + + The current line number or 0 if no line information is available (for example, HasLineInfo returns false). + + + + Gets the current line position. + + The current line position or 0 if no line information is available (for example, HasLineInfo returns false). + + + + Specifies how strings are escaped when writing JSON text. + + + + + Only control characters (e.g. newline) are escaped. + + + + + All non-ASCII and control characters (e.g. newline) are escaped. + + + + + HTML (<, >, &, ', ") and control characters (e.g. newline) are escaped. + + + + + Represents a raw JSON string. + + + + + Represents a value in JSON (string, integer, date, etc). + + + + + Represents an abstract JSON token. + + + + + Represents a collection of objects. + + The type of token + + + + Gets the with the specified key. + + + + + + Compares the values of two tokens, including the values of all descendant tokens. + + The first to compare. + The second to compare. + true if the tokens are equal; otherwise false. + + + + Adds the specified content immediately after this token. + + A content object that contains simple content or a collection of content objects to be added after this token. + + + + Adds the specified content immediately before this token. + + A content object that contains simple content or a collection of content objects to be added before this token. + + + + Returns a collection of the ancestor tokens of this token. + + A collection of the ancestor tokens of this token. + + + + Returns a collection of tokens that contain this token, and the ancestors of this token. + + A collection of tokens that contain this token, and the ancestors of this token. + + + + Returns a collection of the sibling tokens after this token, in document order. + + A collection of the sibling tokens after this tokens, in document order. + + + + Returns a collection of the sibling tokens before this token, in document order. + + A collection of the sibling tokens before this token, in document order. + + + + Gets the with the specified key converted to the specified type. + + The type to convert the token to. + The token key. + The converted token value. + + + + Returns a collection of the child tokens of this token, in document order. + + An of containing the child tokens of this , in document order. + + + + Returns a collection of the child tokens of this token, in document order, filtered by the specified type. + + The type to filter the child tokens on. + A containing the child tokens of this , in document order. + + + + Returns a collection of the child values of this token, in document order. + + The type to convert the values to. + A containing the child values of this , in document order. + + + + Removes this token from its parent. + + + + + Replaces this token with the specified token. + + The value. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Returns the indented JSON for this token. + + + The indented JSON for this token. + + + + + Returns the JSON for this token using the given formatting and converters. + + Indicates how the output is formatted. + A collection of which will be used when writing the token. + The JSON for this token using the given formatting and converters. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to []. + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from [] to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Creates an for this token. + + An that can be used to read this token and its descendants. + + + + Creates a from an object. + + The object that will be used to create . + A with the value of the specified object + + + + Creates a from an object using the specified . + + The object that will be used to create . + The that will be used when reading the object. + A with the value of the specified object + + + + Creates the specified .NET type from the . + + The object type that the token will be deserialized to. + The new object created from the JSON value. + + + + Creates the specified .NET type from the . + + The object type that the token will be deserialized to. + The new object created from the JSON value. + + + + Creates the specified .NET type from the using the specified . + + The object type that the token will be deserialized to. + The that will be used when creating the object. + The new object created from the JSON value. + + + + Creates the specified .NET type from the using the specified . + + The object type that the token will be deserialized to. + The that will be used when creating the object. + The new object created from the JSON value. + + + + Creates a from a . + + An positioned at the token to read into this . + + An that contains the token and its descendant tokens + that were read from the reader. The runtime type of the token is determined + by the token type of the first token encountered in the reader. + + + + + Load a from a string that contains JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + Creates a from a . + + An positioned at the token to read into this . + + An that contains the token and its descendant tokens + that were read from the reader. The runtime type of the token is determined + by the token type of the first token encountered in the reader. + + + + + Selects a using a JPath expression. Selects the token that matches the object path. + + + A that contains a JPath expression. + + A , or null. + + + + Selects a using a JPath expression. Selects the token that matches the object path. + + + A that contains a JPath expression. + + A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. + A . + + + + Selects a collection of elements using a JPath expression. + + + A that contains a JPath expression. + + An that contains the selected elements. + + + + Selects a collection of elements using a JPath expression. + + + A that contains a JPath expression. + + A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. + An that contains the selected elements. + + + + Creates a new instance of the . All child tokens are recursively cloned. + + A new instance of the . + + + + Adds an object to the annotation list of this . + + The annotation to add. + + + + Get the first annotation object of the specified type from this . + + The type of the annotation to retrieve. + The first annotation object that matches the specified type, or null if no annotation is of the specified type. + + + + Gets the first annotation object of the specified type from this . + + The of the annotation to retrieve. + The first annotation object that matches the specified type, or null if no annotation is of the specified type. + + + + Gets a collection of annotations of the specified type for this . + + The type of the annotations to retrieve. + An that contains the annotations for this . + + + + Gets a collection of annotations of the specified type for this . + + The of the annotations to retrieve. + An of that contains the annotations that match the specified type for this . + + + + Removes the annotations of the specified type from this . + + The type of annotations to remove. + + + + Removes the annotations of the specified type from this . + + The of annotations to remove. + + + + Gets a comparer that can compare two tokens for value equality. + + A that can compare two nodes for value equality. + + + + Gets or sets the parent. + + The parent. + + + + Gets the root of this . + + The root of this . + + + + Gets the node type for this . + + The type. + + + + Gets a value indicating whether this token has child tokens. + + + true if this token has child values; otherwise, false. + + + + + Gets the next sibling token of this node. + + The that contains the next sibling token. + + + + Gets the previous sibling token of this node. + + The that contains the previous sibling token. + + + + Gets the path of the JSON token. + + + + + Gets the with the specified key. + + The with the specified key. + + + + Get the first child token of this token. + + A containing the first child token of the . + + + + Get the last child token of this token. + + A containing the last child token of the . + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Creates a comment with the given value. + + The value. + A comment with the given value. + + + + Creates a string with the given value. + + The value. + A string with the given value. + + + + Creates a null value. + + A null value. + + + + Creates a null value. + + A null value. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Indicates whether the current object is equal to another object of the same type. + + + true if the current object is equal to the parameter; otherwise, false. + + An object to compare with this object. + + + + Determines whether the specified is equal to the current . + + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + + The parameter is null. + + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The format. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The format provider. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The format. + The format provider. + + A that represents this instance. + + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings: + Value + Meaning + Less than zero + This instance is less than . + Zero + This instance is equal to . + Greater than zero + This instance is greater than . + + + is not the same type as this instance. + + + + + Gets a value indicating whether this token has child tokens. + + + true if this token has child values; otherwise, false. + + + + + Gets the node type for this . + + The type. + + + + Gets or sets the underlying token value. + + The underlying token value. + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class. + + The raw json. + + + + Creates an instance of with the content of the reader's current token. + + The reader. + An instance of with the content of the reader's current token. + + + + Indicating whether a property is required. + + + + + The property is not required. The default state. + + + + + The property must be defined in JSON but can be a null value. + + + + + The property must be defined in JSON and cannot be a null value. + + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets or sets the ISerializable object constructor. + + The ISerializable object constructor. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Get and set values for a using dynamic methods. + + + + + Provides methods to get and set values. + + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + Initializes a new instance of the class. + + The member info. + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + Provides data for the Error event. + + + + + Initializes a new instance of the class. + + The current object. + The error context. + + + + Gets the current object the error event is being raised against. + + The current object the error event is being raised against. + + + + Gets the error context. + + The error context. + + + + Used to resolve references when serializing and deserializing JSON by the . + + + + + Resolves a reference to its object. + + The serialization context. + The reference to resolve. + The object that + + + + Gets the reference for the sepecified object. + + The serialization context. + The object to get a reference for. + The reference to the object. + + + + Determines whether the specified object is referenced. + + The serialization context. + The object to test for a reference. + + true if the specified object is referenced; otherwise, false. + + + + + Adds a reference to the specified object. + + The serialization context. + The reference. + The object to reference. + + + + Specifies reference handling options for the . + Note that references cannot be preserved when a value is set via a non-default constructor such as types that implement ISerializable. + + + + + + + + Do not preserve references when serializing types. + + + + + Preserve references when serializing into a JSON object structure. + + + + + Preserve references when serializing into a JSON array structure. + + + + + Preserve references when serializing. + + + + + Instructs the how to serialize the collection. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with a flag indicating whether the array can contain null items + + A flag indicating whether the array can contain null items. + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + Gets or sets a value indicating whether null items are allowed in the collection. + + true if null items are allowed in the collection; otherwise, false. + + + + Specifies default value handling options for the . + + + + + + + + + Include members where the member value is the same as the member's default value when serializing objects. + Included members are written to JSON. Has no effect when deserializing. + + + + + Ignore members where the member value is the same as the member's default value when serializing objects + so that is is not written to JSON. + This option will ignore all default values (e.g. null for objects and nullable types; 0 for integers, + decimals and floating point numbers; and false for booleans). The default value ignored can be changed by + placing the on the property. + + + + + Members with a default value but no JSON will be set to their default value when deserializing. + + + + + Ignore members where the member value is the same as the member's default value when serializing objects + and sets members to their default value when deserializing. + + + + + Instructs the to use the specified when serializing the member or class. + + + + + Initializes a new instance of the class. + + Type of the converter. + + + + Initializes a new instance of the class. + + Type of the converter. + Parameter list to use when constructing the JsonConverter. Can be null. + + + + Gets the of the converter. + + The of the converter. + + + + The parameter list to use when constructing the JsonConverter described by ConverterType. + If null, the default constructor is used. + + + + + Instructs the how to serialize the object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified member serialization. + + The member serialization. + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + Gets or sets the member serialization. + + The member serialization. + + + + Gets or sets a value that indicates whether the object's properties are required. + + + A value indicating whether the object's properties are required. + + + + + Specifies the settings on a object. + + + + + Initializes a new instance of the class. + + + + + Gets or sets how reference loops (e.g. a class referencing itself) is handled. + + Reference loop handling. + + + + Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. + + Missing member handling. + + + + Gets or sets how objects are created during deserialization. + + The object creation handling. + + + + Gets or sets how null values are handled during serialization and deserialization. + + Null value handling. + + + + Gets or sets how null default are handled during serialization and deserialization. + + The default value handling. + + + + Gets or sets a collection that will be used during serialization. + + The converters. + + + + Gets or sets how object references are preserved by the serializer. + + The preserve references handling. + + + + Gets or sets how type name writing and reading is handled by the serializer. + + The type name handling. + + + + Gets or sets how metadata properties are used during deserialization. + + The metadata properties handling. + + + + Gets or sets how a type name assembly is written and resolved by the serializer. + + The type name assembly format. + + + + Gets or sets how constructors are used during deserialization. + + The constructor handling. + + + + Gets or sets the contract resolver used by the serializer when + serializing .NET objects to JSON and vice versa. + + The contract resolver. + + + + Gets or sets the equality comparer used by the serializer when comparing references. + + The equality comparer. + + + + Gets or sets the used by the serializer when resolving references. + + The reference resolver. + + + + Gets or sets a function that creates the used by the serializer when resolving references. + + A function that creates the used by the serializer when resolving references. + + + + Gets or sets the used by the serializer when writing trace messages. + + The trace writer. + + + + Gets or sets the used by the serializer when resolving type names. + + The binder. + + + + Gets or sets the error handler called during serialization and deserialization. + + The error handler called during serialization and deserialization. + + + + Gets or sets the used by the serializer when invoking serialization callback methods. + + The context. + + + + Get or set how and values are formatted when writing JSON text, and the expected date format when reading JSON text. + + + + + Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + + + + + Indicates how JSON text output is formatted. + + + + + Get or set how dates are written to JSON text. + + + + + Get or set how time zones are handling during serialization and deserialization. + + + + + Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. + + + + + Get or set how special floating point numbers, e.g. , + and , + are written as JSON. + + + + + Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Get or set how strings are escaped when writing JSON text. + + + + + Gets or sets the culture used when reading JSON. Defaults to . + + + + + Gets a value indicating whether there will be a check for additional content after deserializing an object. + + + true if there will be a check for additional content after deserializing an object; otherwise, false. + + + + + + Represents a reader that provides validation. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Initializes a new instance of the class that + validates the content returned from the given . + + The to read from while validating. + + + + Reads the next JSON token from the stream as a . + + A . + + + + Reads the next JSON token from the stream as a []. + + + A [] or a null reference if the next JSON token is null. + + + + + Reads the next JSON token from the stream as a . + + A . + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Sets an event handler for receiving schema validation errors. + + + + + Gets the text value of the current JSON token. + + + + + + Gets the depth of the current token in the JSON document. + + The depth of the current token in the JSON document. + + + + Gets the path of the current JSON token. + + + + + Gets the quotation mark character used to enclose the value of a string. + + + + + + Gets the type of the current JSON token. + + + + + + Gets the Common Language Runtime (CLR) type for the current JSON token. + + + + + + Gets or sets the schema. + + The schema. + + + + Gets the used to construct this . + + The specified in the constructor. + + + + Compares tokens to determine whether they are equal. + + + + + Determines whether the specified objects are equal. + + The first object of type to compare. + The second object of type to compare. + + true if the specified objects are equal; otherwise, false. + + + + + Returns a hash code for the specified object. + + The for which a hash code is to be returned. + A hash code for the specified object. + The type of is a reference type and is null. + + + + Specifies the member serialization options for the . + + + + + All public members are serialized by default. Members can be excluded using or . + This is the default member serialization mode. + + + + + Only members must be marked with or are serialized. + This member serialization mode can also be set by marking the class with . + + + + + All public and private fields are serialized. Members can be excluded using or . + This member serialization mode can also be set by marking the class with + and setting IgnoreSerializableAttribute on to false. + + + + + Specifies how object creation is handled by the . + + + + + Reuse existing objects, create new objects when needed. + + + + + Only reuse existing objects. + + + + + Always create new objects. + + + + + Converts a to and from the ISO 8601 date format (e.g. 2008-04-12T12:53Z). + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Gets or sets the date time styles used when converting a date to and from JSON. + + The date time styles used when converting a date to and from JSON. + + + + Gets or sets the date time format used when converting a date to and from JSON. + + The date time format used when converting a date to and from JSON. + + + + Gets or sets the culture used when converting a date to and from JSON. + + The culture used when converting a date to and from JSON. + + + + Converts a to and from a JavaScript date constructor (e.g. new Date(52231943)). + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing property value of the JSON that is being converted. + The calling serializer. + The object value. + + + + Converts XML to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The calling serializer. + The value. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Checks if the attributeName is a namespace attribute. + + Attribute name to test. + The attribute name prefix if it has one, otherwise an empty string. + True if attribute name is for a namespace attribute, otherwise false. + + + + Determines whether this instance can convert the specified value type. + + Type of the value. + + true if this instance can convert the specified value type; otherwise, false. + + + + + Gets or sets the name of the root element to insert when deserializing to XML if the JSON structure has produces multiple root elements. + + The name of the deserialize root element. + + + + Gets or sets a flag to indicate whether to write the Json.NET array attribute. + This attribute helps preserve arrays when converting the written XML back to JSON. + + true if the array attibute is written to the XML; otherwise, false. + + + + Gets or sets a value indicating whether to write the root JSON object. + + true if the JSON root object is omitted; otherwise, false. + + + + Represents a reader that provides fast, non-cached, forward-only access to JSON text data. + + + + + Initializes a new instance of the class with the specified . + + The TextReader containing the XML data to read. + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Reads the next JSON token from the stream as a []. + + + A [] or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Changes the state to closed. + + + + + Gets a value indicating whether the class can return line information. + + + true if LineNumber and LinePosition can be provided; otherwise, false. + + + + + Gets the current line number. + + + The current line number or 0 if no line information is available (for example, HasLineInfo returns false). + + + + + Gets the current line position. + + + The current line position or 0 if no line information is available (for example, HasLineInfo returns false). + + + + + Instructs the to always serialize the member with the specified name. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified name. + + Name of the property. + + + + Gets or sets the converter used when serializing the property's collection items. + + The collection's items converter. + + + + The parameter list to use when constructing the JsonConverter described by ItemConverterType. + If null, the default constructor is used. + When non-null, there must be a constructor defined in the JsonConverter that exactly matches the number, + order, and type of these parameters. + + + [JsonProperty(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })] + + + + + Gets or sets the null value handling used when serializing this property. + + The null value handling. + + + + Gets or sets the default value handling used when serializing this property. + + The default value handling. + + + + Gets or sets the reference loop handling used when serializing this property. + + The reference loop handling. + + + + Gets or sets the object creation handling used when deserializing this property. + + The object creation handling. + + + + Gets or sets the type name handling used when serializing this property. + + The type name handling. + + + + Gets or sets whether this property's value is serialized as a reference. + + Whether this property's value is serialized as a reference. + + + + Gets or sets the order of serialization and deserialization of a member. + + The numeric order of serialization or deserialization. + + + + Gets or sets a value indicating whether this property is required. + + + A value indicating whether this property is required. + + + + + Gets or sets the name of the property. + + The name of the property. + + + + Gets or sets the the reference loop handling used when serializing the property's collection items. + + The collection's items reference loop handling. + + + + Gets or sets the the type name handling used when serializing the property's collection items. + + The collection's items type name handling. + + + + Gets or sets whether this property's collection items are serialized as a reference. + + Whether this property's collection items are serialized as a reference. + + + + Instructs the not to serialize the public field or public read/write property value. + + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Creates an instance of the JsonWriter class using the specified . + + The TextWriter to write to. + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Closes this stream and the underlying stream. + + + + + Writes the beginning of a JSON object. + + + + + Writes the beginning of a JSON array. + + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes the specified end token. + + The end token to write. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + A flag to indicate whether the text should be escaped when it is written as a JSON property name. + + + + Writes indent characters. + + + + + Writes the JSON value delimiter. + + + + + Writes an indent space. + + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes raw JSON. + + The raw JSON to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes out the given white space. + + The string of white space characters. + + + + Gets or sets how many IndentChars to write for each level in the hierarchy when is set to Formatting.Indented. + + + + + Gets or sets which character to use to quote attribute values. + + + + + Gets or sets which character to use for indenting when is set to Formatting.Indented. + + + + + Gets or sets a value indicating whether object names will be surrounded with quotes. + + + + + The exception thrown when an error occurs while reading JSON text. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Gets the path to the JSON where the error occurred. + + The path to the JSON where the error occurred. + + + + The exception thrown when an error occurs while reading JSON text. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Gets the line number indicating where the error occurred. + + The line number indicating where the error occurred. + + + + Gets the line position indicating where the error occurred. + + The line position indicating where the error occurred. + + + + Gets the path to the JSON where the error occurred. + + The path to the JSON where the error occurred. + + + + Represents a collection of . + + + + + Provides methods for converting between common language runtime types and JSON types. + + + + + + + + Represents JavaScript's boolean value true as a string. This field is read-only. + + + + + Represents JavaScript's boolean value false as a string. This field is read-only. + + + + + Represents JavaScript's null as a string. This field is read-only. + + + + + Represents JavaScript's undefined as a string. This field is read-only. + + + + + Represents JavaScript's positive infinity as a string. This field is read-only. + + + + + Represents JavaScript's negative infinity as a string. This field is read-only. + + + + + Represents JavaScript's NaN as a string. This field is read-only. + + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation using the specified. + + The value to convert. + The format the date will be converted to. + The time zone handling when the date is converted to a string. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation using the specified. + + The value to convert. + The format the date will be converted to. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + The string delimiter character. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + The string delimiter character. + The string escape handling. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Serializes the specified object to a JSON string. + + The object to serialize. + A JSON string representation of the object. + + + + Serializes the specified object to a JSON string using formatting. + + The object to serialize. + Indicates how the output is formatted. + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using a collection of . + + The object to serialize. + A collection converters used while serializing. + A JSON string representation of the object. + + + + Serializes the specified object to a JSON string using formatting and a collection of . + + The object to serialize. + Indicates how the output is formatted. + A collection converters used while serializing. + A JSON string representation of the object. + + + + Serializes the specified object to a JSON string using . + + The object to serialize. + The used to serialize the object. + If this is null, default serialization settings will be used. + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using a type, formatting and . + + The object to serialize. + The used to serialize the object. + If this is null, default serialization settings will be used. + + The type of the value being serialized. + This parameter is used when is Auto to write out the type name if the type of the value does not match. + Specifing the type is optional. + + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using formatting and . + + The object to serialize. + Indicates how the output is formatted. + The used to serialize the object. + If this is null, default serialization settings will be used. + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using a type, formatting and . + + The object to serialize. + Indicates how the output is formatted. + The used to serialize the object. + If this is null, default serialization settings will be used. + + The type of the value being serialized. + This parameter is used when is Auto to write out the type name if the type of the value does not match. + Specifing the type is optional. + + + A JSON string representation of the object. + + + + + Deserializes the JSON to a .NET object. + + The JSON to deserialize. + The deserialized object from the JSON string. + + + + Deserializes the JSON to a .NET object using . + + The JSON to deserialize. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type. + + The JSON to deserialize. + The of object being deserialized. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type. + + The type of the object to deserialize to. + The JSON to deserialize. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the given anonymous type. + + + The anonymous type to deserialize to. This can't be specified + traditionally and must be infered from the anonymous type passed + as a parameter. + + The JSON to deserialize. + The anonymous type object. + The deserialized anonymous type from the JSON string. + + + + Deserializes the JSON to the given anonymous type using . + + + The anonymous type to deserialize to. This can't be specified + traditionally and must be infered from the anonymous type passed + as a parameter. + + The JSON to deserialize. + The anonymous type object. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized anonymous type from the JSON string. + + + + Deserializes the JSON to the specified .NET type using a collection of . + + The type of the object to deserialize to. + The JSON to deserialize. + Converters to use while deserializing. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type using . + + The type of the object to deserialize to. + The object to deserialize. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type using a collection of . + + The JSON to deserialize. + The type of the object to deserialize. + Converters to use while deserializing. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type using . + + The JSON to deserialize. + The type of the object to deserialize to. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized object from the JSON string. + + + + Populates the object with values from the JSON string. + + The JSON to populate values from. + The target object to populate values onto. + + + + Populates the object with values from the JSON string using . + + The JSON to populate values from. + The target object to populate values onto. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + + + + Serializes the XML node to a JSON string. + + The node to serialize. + A JSON string of the XmlNode. + + + + Serializes the XML node to a JSON string using formatting. + + The node to serialize. + Indicates how the output is formatted. + A JSON string of the XmlNode. + + + + Serializes the XML node to a JSON string using formatting and omits the root object if is true. + + The node to serialize. + Indicates how the output is formatted. + Omits writing the root object. + A JSON string of the XmlNode. + + + + Deserializes the XmlNode from a JSON string. + + The JSON string. + The deserialized XmlNode + + + + Deserializes the XmlNode from a JSON string nested in a root elment specified by . + + The JSON string. + The name of the root element to append when deserializing. + The deserialized XmlNode + + + + Deserializes the XmlNode from a JSON string nested in a root elment specified by + and writes a .NET array attribute for collections. + + The JSON string. + The name of the root element to append when deserializing. + + A flag to indicate whether to write the Json.NET array attribute. + This attribute helps preserve arrays when converting the written XML back to JSON. + + The deserialized XmlNode + + + + Serializes the to a JSON string. + + The node to convert to JSON. + A JSON string of the XNode. + + + + Serializes the to a JSON string using formatting. + + The node to convert to JSON. + Indicates how the output is formatted. + A JSON string of the XNode. + + + + Serializes the to a JSON string using formatting and omits the root object if is true. + + The node to serialize. + Indicates how the output is formatted. + Omits writing the root object. + A JSON string of the XNode. + + + + Deserializes the from a JSON string. + + The JSON string. + The deserialized XNode + + + + Deserializes the from a JSON string nested in a root elment specified by . + + The JSON string. + The name of the root element to append when deserializing. + The deserialized XNode + + + + Deserializes the from a JSON string nested in a root elment specified by + and writes a .NET array attribute for collections. + + The JSON string. + The name of the root element to append when deserializing. + + A flag to indicate whether to write the Json.NET array attribute. + This attribute helps preserve arrays when converting the written XML back to JSON. + + The deserialized XNode + + + + Gets or sets a function that creates default . + Default settings are automatically used by serialization methods on , + and and on . + To serialize without using any default settings create a with + . + + + + + The exception thrown when an error occurs during JSON serialization or deserialization. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Serializes and deserializes objects into and from the JSON format. + The enables you to control how objects are encoded into JSON. + + + + + Initializes a new instance of the class. + + + + + Creates a new instance. + The will not use default settings. + + + A new instance. + The will not use default settings. + + + + + Creates a new instance using the specified . + The will not use default settings. + + The settings to be applied to the . + + A new instance using the specified . + The will not use default settings. + + + + + Creates a new instance. + The will use default settings. + + + A new instance. + The will use default settings. + + + + + Creates a new instance using the specified . + The will use default settings. + + The settings to be applied to the . + + A new instance using the specified . + The will use default settings. + + + + + Populates the JSON values onto the target object. + + The that contains the JSON structure to reader values from. + The target object to populate values onto. + + + + Populates the JSON values onto the target object. + + The that contains the JSON structure to reader values from. + The target object to populate values onto. + + + + Deserializes the JSON structure contained by the specified . + + The that contains the JSON structure to deserialize. + The being deserialized. + + + + Deserializes the JSON structure contained by the specified + into an instance of the specified type. + + The containing the object. + The of object being deserialized. + The instance of being deserialized. + + + + Deserializes the JSON structure contained by the specified + into an instance of the specified type. + + The containing the object. + The type of the object to deserialize. + The instance of being deserialized. + + + + Deserializes the JSON structure contained by the specified + into an instance of the specified type. + + The containing the object. + The of object being deserialized. + The instance of being deserialized. + + + + Serializes the specified and writes the JSON structure + to a Stream using the specified . + + The used to write the JSON structure. + The to serialize. + + + + Serializes the specified and writes the JSON structure + to a Stream using the specified . + + The used to write the JSON structure. + The to serialize. + + The type of the value being serialized. + This parameter is used when is Auto to write out the type name if the type of the value does not match. + Specifing the type is optional. + + + + + Serializes the specified and writes the JSON structure + to a Stream using the specified . + + The used to write the JSON structure. + The to serialize. + + The type of the value being serialized. + This parameter is used when is Auto to write out the type name if the type of the value does not match. + Specifing the type is optional. + + + + + Serializes the specified and writes the JSON structure + to a Stream using the specified . + + The used to write the JSON structure. + The to serialize. + + + + Occurs when the errors during serialization and deserialization. + + + + + Gets or sets the used by the serializer when resolving references. + + + + + Gets or sets the used by the serializer when resolving type names. + + + + + Gets or sets the used by the serializer when writing trace messages. + + The trace writer. + + + + Gets or sets the equality comparer used by the serializer when comparing references. + + The equality comparer. + + + + Gets or sets how type name writing and reading is handled by the serializer. + + + + + Gets or sets how a type name assembly is written and resolved by the serializer. + + The type name assembly format. + + + + Gets or sets how object references are preserved by the serializer. + + + + + Get or set how reference loops (e.g. a class referencing itself) is handled. + + + + + Get or set how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. + + + + + Get or set how null values are handled during serialization and deserialization. + + + + + Get or set how null default are handled during serialization and deserialization. + + + + + Gets or sets how objects are created during deserialization. + + The object creation handling. + + + + Gets or sets how constructors are used during deserialization. + + The constructor handling. + + + + Gets or sets how metadata properties are used during deserialization. + + The metadata properties handling. + + + + Gets a collection that will be used during serialization. + + Collection that will be used during serialization. + + + + Gets or sets the contract resolver used by the serializer when + serializing .NET objects to JSON and vice versa. + + + + + Gets or sets the used by the serializer when invoking serialization callback methods. + + The context. + + + + Indicates how JSON text output is formatted. + + + + + Get or set how dates are written to JSON text. + + + + + Get or set how time zones are handling during serialization and deserialization. + + + + + Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. + + + + + Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Get or set how special floating point numbers, e.g. , + and , + are written as JSON text. + + + + + Get or set how strings are escaped when writing JSON text. + + + + + Get or set how and values are formatted when writing JSON text, and the expected date format when reading JSON text. + + + + + Gets or sets the culture used when reading JSON. Defaults to . + + + + + Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + + + + + Gets a value indicating whether there will be a check for additional JSON content after deserializing an object. + + + true if there will be a check for additional JSON content after deserializing an object; otherwise, false. + + + + + Contains the LINQ to JSON extension methods. + + + + + Returns a collection of tokens that contains the ancestors of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains the ancestors of every token in the source collection. + + + + Returns a collection of tokens that contains every token in the source collection, and the ancestors of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains every token in the source collection, the ancestors of every token in the source collection. + + + + Returns a collection of tokens that contains the descendants of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains the descendants of every token in the source collection. + + + + Returns a collection of tokens that contains every token in the source collection, and the descendants of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains every token in the source collection, and the descendants of every token in the source collection. + + + + Returns a collection of child properties of every object in the source collection. + + An of that contains the source collection. + An of that contains the properties of every object in the source collection. + + + + Returns a collection of child values of every object in the source collection with the given key. + + An of that contains the source collection. + The token key. + An of that contains the values of every token in the source collection with the given key. + + + + Returns a collection of child values of every object in the source collection. + + An of that contains the source collection. + An of that contains the values of every token in the source collection. + + + + Returns a collection of converted child values of every object in the source collection with the given key. + + The type to convert the values to. + An of that contains the source collection. + The token key. + An that contains the converted values of every token in the source collection with the given key. + + + + Returns a collection of converted child values of every object in the source collection. + + The type to convert the values to. + An of that contains the source collection. + An that contains the converted values of every token in the source collection. + + + + Converts the value. + + The type to convert the value to. + A cast as a of . + A converted value. + + + + Converts the value. + + The source collection type. + The type to convert the value to. + A cast as a of . + A converted value. + + + + Returns a collection of child tokens of every array in the source collection. + + The source collection type. + An of that contains the source collection. + An of that contains the values of every token in the source collection. + + + + Returns a collection of converted child tokens of every array in the source collection. + + An of that contains the source collection. + The type to convert the values to. + The source collection type. + An that contains the converted values of every token in the source collection. + + + + Returns the input typed as . + + An of that contains the source collection. + The input typed as . + + + + Returns the input typed as . + + The source collection type. + An of that contains the source collection. + The input typed as . + + + + Represents a JSON constructor. + + + + + Represents a token that can contain other tokens. + + + + + Raises the event. + + The instance containing the event data. + + + + Raises the event. + + The instance containing the event data. + + + + Returns a collection of the child tokens of this token, in document order. + + + An of containing the child tokens of this , in document order. + + + + + Returns a collection of the child values of this token, in document order. + + The type to convert the values to. + + A containing the child values of this , in document order. + + + + + Returns a collection of the descendant tokens for this token in document order. + + An containing the descendant tokens of the . + + + + Returns a collection of the tokens that contain this token, and all descendant tokens of this token, in document order. + + An containing this token, and all the descendant tokens of the . + + + + Adds the specified content as children of this . + + The content to be added. + + + + Adds the specified content as the first children of this . + + The content to be added. + + + + Creates an that can be used to add tokens to the . + + An that is ready to have content written to it. + + + + Replaces the children nodes of this token with the specified content. + + The content. + + + + Removes the child nodes from this token. + + + + + Merge the specified content into this . + + The content to be merged. + + + + Merge the specified content into this using . + + The content to be merged. + The used to merge the content. + + + + Occurs when the list changes or an item in the list changes. + + + + + Occurs before an item is added to the collection. + + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets a value indicating whether this token has child tokens. + + + true if this token has child values; otherwise, false. + + + + + Get the first child token of this token. + + + A containing the first child token of the . + + + + + Get the last child token of this token. + + + A containing the last child token of the . + + + + + Gets the count of child JSON tokens. + + The count of child JSON tokens + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the specified name and content. + + The constructor name. + The contents of the constructor. + + + + Initializes a new instance of the class with the specified name and content. + + The constructor name. + The contents of the constructor. + + + + Initializes a new instance of the class with the specified name. + + The constructor name. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets or sets the name of this constructor. + + The constructor name. + + + + Gets the node type for this . + + The type. + + + + Gets the with the specified key. + + The with the specified key. + + + + Represents a collection of objects. + + The type of token + + + + An empty collection of objects. + + + + + Initializes a new instance of the struct. + + The enumerable. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Gets the with the specified key. + + + + + + Represents a JSON object. + + + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the specified content. + + The contents of the object. + + + + Initializes a new instance of the class with the specified content. + + The contents of the object. + + + + Gets an of this object's properties. + + An of this object's properties. + + + + Gets a the specified name. + + The property name. + A with the specified name or null. + + + + Gets an of this object's property values. + + An of this object's property values. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Load a from a string that contains JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + + + + Creates a from an object. + + The object that will be used to create . + A with the values of the specified object + + + + Creates a from an object. + + The object that will be used to create . + The that will be used to read the object. + A with the values of the specified object + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Gets the with the specified property name. + + Name of the property. + The with the specified property name. + + + + Gets the with the specified property name. + The exact property name will be searched for first and if no matching property is found then + the will be used to match a property. + + Name of the property. + One of the enumeration values that specifies how the strings will be compared. + The with the specified property name. + + + + Tries to get the with the specified property name. + The exact property name will be searched for first and if no matching property is found then + the will be used to match a property. + + Name of the property. + The value. + One of the enumeration values that specifies how the strings will be compared. + true if a value was successfully retrieved; otherwise, false. + + + + Adds the specified property name. + + Name of the property. + The value. + + + + Removes the property with the specified name. + + Name of the property. + true if item was successfully removed; otherwise, false. + + + + Tries the get value. + + Name of the property. + The value. + true if a value was successfully retrieved; otherwise, false. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Raises the event with the provided arguments. + + Name of the property. + + + + Raises the event with the provided arguments. + + Name of the property. + + + + Returns the properties for this instance of a component. + + + A that represents the properties for this component instance. + + + + + Returns the properties for this instance of a component using the attribute array as a filter. + + An array of type that is used as a filter. + + A that represents the filtered properties for this component instance. + + + + + Returns a collection of custom attributes for this instance of a component. + + + An containing the attributes for this object. + + + + + Returns the class name of this instance of a component. + + + The class name of the object, or null if the class does not have a name. + + + + + Returns the name of this instance of a component. + + + The name of the object, or null if the object does not have a name. + + + + + Returns a type converter for this instance of a component. + + + A that is the converter for this object, or null if there is no for this object. + + + + + Returns the default event for this instance of a component. + + + An that represents the default event for this object, or null if this object does not have events. + + + + + Returns the default property for this instance of a component. + + + A that represents the default property for this object, or null if this object does not have properties. + + + + + Returns an editor of the specified type for this instance of a component. + + A that represents the editor for this object. + + An of the specified type that is the editor for this object, or null if the editor cannot be found. + + + + + Returns the events for this instance of a component using the specified attribute array as a filter. + + An array of type that is used as a filter. + + An that represents the filtered events for this component instance. + + + + + Returns the events for this instance of a component. + + + An that represents the events for this component instance. + + + + + Returns an object that contains the property described by the specified property descriptor. + + A that represents the property whose owner is to be found. + + An that represents the owner of the specified property. + + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Occurs when a property value changes. + + + + + Occurs when a property value is changing. + + + + + Gets the node type for this . + + The type. + + + + Gets the with the specified key. + + The with the specified key. + + + + Gets or sets the with the specified property name. + + + + + + Represents a JSON array. + + + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the specified content. + + The contents of the array. + + + + Initializes a new instance of the class with the specified content. + + The contents of the array. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Load a from a string that contains JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + + + + Creates a from an object. + + The object that will be used to create . + A with the values of the specified object + + + + Creates a from an object. + + The object that will be used to create . + The that will be used to read the object. + A with the values of the specified object + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Inserts an item to the at the specified index. + + The zero-based index at which should be inserted. + The object to insert into the . + + is not a valid index in the . + The is read-only. + + + + Removes the item at the specified index. + + The zero-based index of the item to remove. + + is not a valid index in the . + The is read-only. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Adds an item to the . + + The object to add to the . + The is read-only. + + + + Removes all items from the . + + The is read-only. + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Copies to. + + The array. + Index of the array. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + The is read-only. + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets the node type for this . + + The type. + + + + Gets the with the specified key. + + The with the specified key. + + + + Gets or sets the at the specified index. + + + + + + Gets a value indicating whether the is read-only. + + true if the is read-only; otherwise, false. + + + + Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. + + + + + Initializes a new instance of the class. + + The token to read from. + + + + Reads the next JSON token from the stream as a []. + + + A [] or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Gets the at the reader's current position. + + + + + Gets the path of the current JSON token. + + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Initializes a new instance of the class writing to the given . + + The container being written to. + + + + Initializes a new instance of the class. + + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Closes this stream and the underlying stream. + + + + + Writes the beginning of a JSON object. + + + + + Writes the beginning of a JSON array. + + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes the end. + + The token. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes raw JSON. + + The raw JSON to write. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Gets the at the writer's current position. + + + + + Gets the token being writen. + + The token being writen. + + + + Represents a JSON property. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class. + + The property name. + The property content. + + + + Initializes a new instance of the class. + + The property name. + The property content. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets the property name. + + The property name. + + + + Gets or sets the property value. + + The property value. + + + + Gets the node type for this . + + The type. + + + + Specifies the type of token. + + + + + No token type has been set. + + + + + A JSON object. + + + + + A JSON array. + + + + + A JSON constructor. + + + + + A JSON object property. + + + + + A comment. + + + + + An integer value. + + + + + A float value. + + + + + A string value. + + + + + A boolean value. + + + + + A null value. + + + + + An undefined value. + + + + + A date value. + + + + + A raw JSON value. + + + + + A collection of bytes value. + + + + + A Guid value. + + + + + A Uri value. + + + + + A TimeSpan value. + + + + + + Contains the JSON schema extension methods. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + + Determines whether the is valid. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + + true if the specified is valid; otherwise, false. + + + + + + Determines whether the is valid. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + When this method returns, contains any error messages generated while validating. + + true if the specified is valid; otherwise, false. + + + + + + Validates the specified . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + + + + + Validates the specified . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + The validation event handler. + + + + + Returns detailed information about the schema exception. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Gets the line number indicating where the error occurred. + + The line number indicating where the error occurred. + + + + Gets the line position indicating where the error occurred. + + The line position indicating where the error occurred. + + + + Gets the path to the JSON where the error occurred. + + The path to the JSON where the error occurred. + + + + + Resolves from an id. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Initializes a new instance of the class. + + + + + Gets a for the specified reference. + + The id. + A for the specified reference. + + + + Gets or sets the loaded schemas. + + The loaded schemas. + + + + + Specifies undefined schema Id handling options for the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Do not infer a schema Id. + + + + + Use the .NET type name as the schema Id. + + + + + Use the assembly qualified .NET type name as the schema Id. + + + + + + Returns detailed information related to the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Gets the associated with the validation error. + + The JsonSchemaException associated with the validation error. + + + + Gets the path of the JSON location where the validation error occurred. + + The path of the JSON location where the validation error occurred. + + + + Gets the text description corresponding to the validation error. + + The text description. + + + + + Represents the callback method that will handle JSON schema validation events and the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Resolves member mappings for a type, camel casing property names. + + + + + Used by to resolves a for a given . + + + + + Used by to resolves a for a given . + + + + + + + + + Resolves the contract for a given type. + + The type to resolve a contract for. + The contract for a given type. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + If set to true the will use a cached shared with other resolvers of the same type. + Sharing the cache will significantly improve performance with multiple resolver instances because expensive reflection will only + happen once. This setting can cause unexpected behavior if different instances of the resolver are suppose to produce different + results. When set to false it is highly recommended to reuse instances with the . + + + + + Resolves the contract for a given type. + + The type to resolve a contract for. + The contract for a given type. + + + + Gets the serializable members for the type. + + The type to get serializable members for. + The serializable members for the type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates the constructor parameters. + + The constructor to create properties for. + The type's member properties. + Properties for the given . + + + + Creates a for the given . + + The matching member property. + The constructor parameter. + A created for the given . + + + + Resolves the default for the contract. + + Type of the object. + The contract's default . + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Determines which contract type is created for the given type. + + Type of the object. + A for the given type. + + + + Creates properties for the given . + + The type to create properties for. + /// The member serialization mode for the type. + Properties for the given . + + + + Creates the used by the serializer to get and set values from a member. + + The member. + The used by the serializer to get and set values from a member. + + + + Creates a for the given . + + The member's parent . + The member to create a for. + A created for the given . + + + + Resolves the name of the property. + + Name of the property. + Resolved name of the property. + + + + Resolves the key of the dictionary. By default is used to resolve dictionary keys. + + Key of the dictionary. + Resolved key of the dictionary. + + + + Gets the resolved name of the property. + + Name of the property. + Name of the property. + + + + Gets a value indicating whether members are being get and set using dynamic code generation. + This value is determined by the runtime permissions available. + + + true if using dynamic code generation; otherwise, false. + + + + + Gets or sets the default members search flags. + + The default members search flags. + + + + Gets or sets a value indicating whether compiler generated members should be serialized. + + + true if serialized compiler generated members; otherwise, false. + + + + + Gets or sets a value indicating whether to ignore the interface when serializing and deserializing types. + + + true if the interface will be ignored when serializing and deserializing types; otherwise, false. + + + + + Gets or sets a value indicating whether to ignore the attribute when serializing and deserializing types. + + + true if the attribute will be ignored when serializing and deserializing types; otherwise, false. + + + + + Initializes a new instance of the class. + + + + + Resolves the name of the property. + + Name of the property. + The property name camel cased. + + + + The default serialization binder used when resolving and loading classes from type names. + + + + + When overridden in a derived class, controls the binding of a serialized object to a type. + + Specifies the name of the serialized object. + Specifies the name of the serialized object. + + The type of the object the formatter creates a new instance of. + + + + + Provides information surrounding an error. + + + + + Gets the error. + + The error. + + + + Gets the original object that caused the error. + + The original object that caused the error. + + + + Gets the member that caused the error. + + The member that caused the error. + + + + Gets the path of the JSON location where the error occurred. + + The path of the JSON location where the error occurred. + + + + Gets or sets a value indicating whether this is handled. + + true if handled; otherwise, false. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets the of the collection items. + + The of the collection items. + + + + Gets a value indicating whether the collection type is a multidimensional array. + + true if the collection type is a multidimensional array; otherwise, false. + + + + Handles serialization callback events. + + The object that raised the callback event. + The streaming context. + + + + Handles serialization error callback events. + + The object that raised the callback event. + The streaming context. + The error context. + + + + Sets extension data for an object during deserialization. + + The object to set extension data on. + The extension data key. + The extension data value. + + + + Gets extension data for an object during serialization. + + The object to set extension data on. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets or sets the property name resolver. + + The property name resolver. + + + + Gets or sets the dictionary key resolver. + + The dictionary key resolver. + + + + Gets the of the dictionary keys. + + The of the dictionary keys. + + + + Gets the of the dictionary values. + + The of the dictionary values. + + + + Maps a JSON property to a .NET member or constructor parameter. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets or sets the name of the property. + + The name of the property. + + + + Gets or sets the type that declared this property. + + The type that declared this property. + + + + Gets or sets the order of serialization and deserialization of a member. + + The numeric order of serialization or deserialization. + + + + Gets or sets the name of the underlying member or parameter. + + The name of the underlying member or parameter. + + + + Gets the that will get and set the during serialization. + + The that will get and set the during serialization. + + + + Gets or sets the for this property. + + The for this property. + + + + Gets or sets the type of the property. + + The type of the property. + + + + Gets or sets the for the property. + If set this converter takes presidence over the contract converter for the property type. + + The converter. + + + + Gets or sets the member converter. + + The member converter. + + + + Gets or sets a value indicating whether this is ignored. + + true if ignored; otherwise, false. + + + + Gets or sets a value indicating whether this is readable. + + true if readable; otherwise, false. + + + + Gets or sets a value indicating whether this is writable. + + true if writable; otherwise, false. + + + + Gets or sets a value indicating whether this has a member attribute. + + true if has a member attribute; otherwise, false. + + + + Gets the default value. + + The default value. + + + + Gets or sets a value indicating whether this is required. + + A value indicating whether this is required. + + + + Gets or sets a value indicating whether this property preserves object references. + + + true if this instance is reference; otherwise, false. + + + + + Gets or sets the property null value handling. + + The null value handling. + + + + Gets or sets the property default value handling. + + The default value handling. + + + + Gets or sets the property reference loop handling. + + The reference loop handling. + + + + Gets or sets the property object creation handling. + + The object creation handling. + + + + Gets or sets or sets the type name handling. + + The type name handling. + + + + Gets or sets a predicate used to determine whether the property should be serialize. + + A predicate used to determine whether the property should be serialize. + + + + Gets or sets a predicate used to determine whether the property should be serialized. + + A predicate used to determine whether the property should be serialized. + + + + Gets or sets an action used to set whether the property has been deserialized. + + An action used to set whether the property has been deserialized. + + + + Gets or sets the converter used when serializing the property's collection items. + + The collection's items converter. + + + + Gets or sets whether this property's collection items are serialized as a reference. + + Whether this property's collection items are serialized as a reference. + + + + Gets or sets the the type name handling used when serializing the property's collection items. + + The collection's items type name handling. + + + + Gets or sets the the reference loop handling used when serializing the property's collection items. + + The collection's items reference loop handling. + + + + A collection of objects. + + + + + Initializes a new instance of the class. + + The type. + + + + When implemented in a derived class, extracts the key from the specified element. + + The element from which to extract the key. + The key for the specified element. + + + + Adds a object. + + The property to add to the collection. + + + + Gets the closest matching object. + First attempts to get an exact case match of propertyName and then + a case insensitive match. + + Name of the property. + A matching property if found. + + + + Gets a property by property name. + + The name of the property to get. + Type property name string comparison. + A matching property if found. + + + + Specifies missing member handling options for the . + + + + + Ignore a missing member and do not attempt to deserialize it. + + + + + Throw a when a missing member is encountered during deserialization. + + + + + Specifies null value handling options for the . + + + + + + + + + Include null values when serializing and deserializing objects. + + + + + Ignore null values when serializing and deserializing objects. + + + + + Specifies reference loop handling options for the . + + + + + Throw a when a loop is encountered. + + + + + Ignore loop references and do not serialize. + + + + + Serialize loop references. + + + + + + An in-memory representation of a JSON Schema. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Initializes a new instance of the class. + + + + + Reads a from the specified . + + The containing the JSON Schema to read. + The object representing the JSON Schema. + + + + Reads a from the specified . + + The containing the JSON Schema to read. + The to use when resolving schema references. + The object representing the JSON Schema. + + + + Load a from a string that contains schema JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + Parses the specified json. + + The json. + The resolver. + A populated from the string that contains JSON. + + + + Writes this schema to a . + + A into which this method will write. + + + + Writes this schema to a using the specified . + + A into which this method will write. + The resolver used. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets or sets the id. + + + + + Gets or sets the title. + + + + + Gets or sets whether the object is required. + + + + + Gets or sets whether the object is read only. + + + + + Gets or sets whether the object is visible to users. + + + + + Gets or sets whether the object is transient. + + + + + Gets or sets the description of the object. + + + + + Gets or sets the types of values allowed by the object. + + The type. + + + + Gets or sets the pattern. + + The pattern. + + + + Gets or sets the minimum length. + + The minimum length. + + + + Gets or sets the maximum length. + + The maximum length. + + + + Gets or sets a number that the value should be divisble by. + + A number that the value should be divisble by. + + + + Gets or sets the minimum. + + The minimum. + + + + Gets or sets the maximum. + + The maximum. + + + + Gets or sets a flag indicating whether the value can not equal the number defined by the "minimum" attribute. + + A flag indicating whether the value can not equal the number defined by the "minimum" attribute. + + + + Gets or sets a flag indicating whether the value can not equal the number defined by the "maximum" attribute. + + A flag indicating whether the value can not equal the number defined by the "maximum" attribute. + + + + Gets or sets the minimum number of items. + + The minimum number of items. + + + + Gets or sets the maximum number of items. + + The maximum number of items. + + + + Gets or sets the of items. + + The of items. + + + + Gets or sets a value indicating whether items in an array are validated using the instance at their array position from . + + + true if items are validated using their array position; otherwise, false. + + + + + Gets or sets the of additional items. + + The of additional items. + + + + Gets or sets a value indicating whether additional items are allowed. + + + true if additional items are allowed; otherwise, false. + + + + + Gets or sets whether the array items must be unique. + + + + + Gets or sets the of properties. + + The of properties. + + + + Gets or sets the of additional properties. + + The of additional properties. + + + + Gets or sets the pattern properties. + + The pattern properties. + + + + Gets or sets a value indicating whether additional properties are allowed. + + + true if additional properties are allowed; otherwise, false. + + + + + Gets or sets the required property if this property is present. + + The required property if this property is present. + + + + Gets or sets the a collection of valid enum values allowed. + + A collection of valid enum values allowed. + + + + Gets or sets disallowed types. + + The disallow types. + + + + Gets or sets the default value. + + The default value. + + + + Gets or sets the collection of that this schema extends. + + The collection of that this schema extends. + + + + Gets or sets the format. + + The format. + + + + + Generates a from a specified . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Generate a from the specified type. + + The type to generate a from. + A generated from the specified type. + + + + Generate a from the specified type. + + The type to generate a from. + The used to resolve schema references. + A generated from the specified type. + + + + Generate a from the specified type. + + The type to generate a from. + Specify whether the generated root will be nullable. + A generated from the specified type. + + + + Generate a from the specified type. + + The type to generate a from. + The used to resolve schema references. + Specify whether the generated root will be nullable. + A generated from the specified type. + + + + Gets or sets how undefined schemas are handled by the serializer. + + + + + Gets or sets the contract resolver. + + The contract resolver. + + + + + The value types allowed by the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + No type specified. + + + + + String type. + + + + + Float type. + + + + + Integer type. + + + + + Boolean type. + + + + + Object type. + + + + + Array type. + + + + + Null type. + + + + + Any type. + + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets or sets the object member serialization. + + The member object serialization. + + + + Gets or sets a value that indicates whether the object's properties are required. + + + A value indicating whether the object's properties are required. + + + + + Gets the object's properties. + + The object's properties. + + + + Gets the constructor parameters required for any non-default constructor + + + + + Gets a collection of instances that define the parameters used with . + + + + + Gets or sets the override constructor used to create the object. + This is set when a constructor is marked up using the + JsonConstructor attribute. + + The override constructor. + + + + Gets or sets the parametrized constructor used to create the object. + + The parametrized constructor. + + + + Gets or sets the function used to create the object. When set this function will override . + This function is called with a collection of arguments which are defined by the collection. + + The function used to create the object. + + + + Gets or sets the extension data setter. + + + + + Gets or sets the extension data getter. + + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Lookup and create an instance of the JsonConverter type described by the argument. + + The JsonConverter type to create. + Optional arguments to pass to an initializing constructor of the JsonConverter. + If null, the default constructor is used. + + + + Create a factory function that can be used to create instances of a JsonConverter described by the + argument type. The returned function can then be used to either invoke the converter's default ctor, or any + parameterized constructors by way of an object array. + + + + + Get and set values for a using reflection. + + + + + Initializes a new instance of the class. + + The member info. + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + When applied to a method, specifies that the method is called when an error occurs serializing an object. + + + + + Represents a method that constructs an object. + + The object type to create. + + + + Specifies type name handling options for the . + + + + + Do not include the .NET type name when serializing types. + + + + + Include the .NET type name when serializing into a JSON object structure. + + + + + Include the .NET type name when serializing into a JSON array structure. + + + + + Always include the .NET type name when serializing. + + + + + Include the .NET type name when the type of the object being serialized is not the same as its declared type. + + + + + Converts the value to the specified type. If the value is unable to be converted, the + value is checked whether it assignable to the specified type. + + The value to convert. + The culture to use when converting. + The type to convert or cast the value to. + + The converted type. If conversion was unsuccessful, the initial value + is returned if assignable to the target type. + + + + + Gets a dictionary of the names and values of an Enum type. + + + + + + Gets a dictionary of the names and values of an Enum type. + + The enum type to get names and values for. + + + + + Specifies the type of JSON token. + + + + + This is returned by the if a method has not been called. + + + + + An object start token. + + + + + An array start token. + + + + + A constructor start token. + + + + + An object property name. + + + + + A comment. + + + + + Raw JSON. + + + + + An integer. + + + + + A float. + + + + + A string. + + + + + A boolean. + + + + + A null token. + + + + + An undefined token. + + + + + An object end token. + + + + + An array end token. + + + + + A constructor end token. + + + + + A Date. + + + + + Byte data. + + + + + Builds a string. Unlike StringBuilder this class lets you reuse it's internal buffer. + + + + + Determines whether the collection is null or empty. + + The collection. + + true if the collection is null or empty; otherwise, false. + + + + + Adds the elements of the specified collection to the specified generic IList. + + The list to add to. + The collection of elements to add. + + + + Returns the index of the first occurrence in a sequence by using a specified IEqualityComparer{TSource}. + + The type of the elements of source. + A sequence in which to locate a value. + The object to locate in the sequence + An equality comparer to compare values. + The zero-based index of the first occurrence of value within the entire sequence, if found; otherwise, –1. + + + + Gets the type of the typed collection's items. + + The type. + The type of the typed collection's items. + + + + Gets the member's underlying type. + + The member. + The underlying type of the member. + + + + Determines whether the member is an indexed property. + + The member. + + true if the member is an indexed property; otherwise, false. + + + + + Determines whether the property is an indexed property. + + The property. + + true if the property is an indexed property; otherwise, false. + + + + + Gets the member's value on the object. + + The member. + The target object. + The member's value on the object. + + + + Sets the member's value on the target object. + + The member. + The target. + The value. + + + + Determines whether the specified MemberInfo can be read. + + The MemberInfo to determine whether can be read. + /// if set to true then allow the member to be gotten non-publicly. + + true if the specified MemberInfo can be read; otherwise, false. + + + + + Determines whether the specified MemberInfo can be set. + + The MemberInfo to determine whether can be set. + if set to true then allow the member to be set non-publicly. + if set to true then allow the member to be set if read-only. + + true if the specified MemberInfo can be set; otherwise, false. + + + + + Determines whether the string is all white space. Empty string will return false. + + The string to test whether it is all white space. + + true if the string is all white space; otherwise, false. + + + + + Nulls an empty string. + + The string. + Null if the string was null, otherwise the string unchanged. + + + + Specifies the state of the . + + + + + An exception has been thrown, which has left the in an invalid state. + You may call the method to put the in the Closed state. + Any other method calls results in an being thrown. + + + + + The method has been called. + + + + + An object is being written. + + + + + A array is being written. + + + + + A constructor is being written. + + + + + A property is being written. + + + + + A write method has not been called. + + + + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net40/Newtonsoft.Json.dll b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net40/Newtonsoft.Json.dll new file mode 100644 index 00000000..ae725c4b Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net40/Newtonsoft.Json.dll differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net40/Newtonsoft.Json.pdb b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net40/Newtonsoft.Json.pdb new file mode 100644 index 00000000..a4f58328 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net40/Newtonsoft.Json.pdb differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net40/Newtonsoft.Json.xml b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net40/Newtonsoft.Json.xml new file mode 100644 index 00000000..679c7c6b --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net40/Newtonsoft.Json.xml @@ -0,0 +1,8889 @@ + + + + Newtonsoft.Json + + + + + Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. + + + + + Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. + + + + + Initializes a new instance of the class with the specified . + + + + + Reads the next JSON token from the stream. + + true if the next token was read successfully; false if there are no more tokens to read. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a []. + + A [] or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Skips the children of the current token. + + + + + Sets the current token. + + The new token. + + + + Sets the current token and value. + + The new token. + The value. + + + + Sets the state based on current token type. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Releases unmanaged and - optionally - managed resources + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Changes the to Closed. + + + + + Gets the current reader state. + + The current reader state. + + + + Gets or sets a value indicating whether the underlying stream or + should be closed when the reader is closed. + + + true to close the underlying stream or when + the reader is closed; otherwise false. The default is true. + + + + + Gets or sets a value indicating whether multiple pieces of JSON content can + be read from a continuous stream without erroring. + + + true to support reading multiple pieces of JSON content; otherwise false. The default is false. + + + + + Gets the quotation mark character used to enclose the value of a string. + + + + + Get or set how time zones are handling when reading JSON. + + + + + Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. + + + + + Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Get or set how custom date formatted strings are parsed when reading JSON. + + + + + Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + + + + + Gets the type of the current JSON token. + + + + + Gets the text value of the current JSON token. + + + + + Gets The Common Language Runtime (CLR) type for the current JSON token. + + + + + Gets the depth of the current token in the JSON document. + + The depth of the current token in the JSON document. + + + + Gets the path of the current JSON token. + + + + + Gets or sets the culture used when reading JSON. Defaults to . + + + + + Specifies the state of the reader. + + + + + The Read method has not been called. + + + + + The end of the file has been reached successfully. + + + + + Reader is at a property. + + + + + Reader is at the start of an object. + + + + + Reader is in an object. + + + + + Reader is at the start of an array. + + + + + Reader is in an array. + + + + + The Close method has been called. + + + + + Reader has just read a value. + + + + + Reader is at the start of a constructor. + + + + + Reader in a constructor. + + + + + An error occurred that prevents the read operation from continuing. + + + + + The end of the file has been reached successfully. + + + + + Initializes a new instance of the class. + + The stream. + + + + Initializes a new instance of the class. + + The reader. + + + + Initializes a new instance of the class. + + The stream. + if set to true the root object will be read as a JSON array. + The used when reading values from BSON. + + + + Initializes a new instance of the class. + + The reader. + if set to true the root object will be read as a JSON array. + The used when reading values from BSON. + + + + Reads the next JSON token from the stream as a []. + + + A [] or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + + A . This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Changes the to Closed. + + + + + Gets or sets a value indicating whether binary data reading should compatible with incorrect Json.NET 3.5 written binary. + + + true if binary data reading will be compatible with incorrect Json.NET 3.5 written binary; otherwise, false. + + + + + Gets or sets a value indicating whether the root object will be read as a JSON array. + + + true if the root object will be read as a JSON array; otherwise, false. + + + + + Gets or sets the used when reading values from BSON. + + The used when reading values from BSON. + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Creates an instance of the JsonWriter class. + + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Closes this stream and the underlying stream. + + + + + Writes the beginning of a JSON object. + + + + + Writes the end of a JSON object. + + + + + Writes the beginning of a JSON array. + + + + + Writes the end of an array. + + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes the end constructor. + + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + A flag to indicate whether the text should be escaped when it is written as a JSON property name. + + + + Writes the end of the current JSON object or array. + + + + + Writes the current token and its children. + + The to read the token from. + + + + Writes the current token. + + The to read the token from. + A flag indicating whether the current token's children should be written. + + + + Writes the token and its value. + + The to write. + + The value to write. + A value is only required for tokens that have an associated value, e.g. the property name for . + A null value can be passed to the method for token's that don't have a value, e.g. . + + + + Writes the token. + + The to write. + + + + Writes the specified end token. + + The end token to write. + + + + Writes indent characters. + + + + + Writes the JSON value delimiter. + + + + + Writes an indent space. + + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes raw JSON without changing the writer's state. + + The raw JSON to write. + + + + Writes raw JSON where a value is expected and updates the writer's state. + + The raw JSON to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes out the given white space. + + The string of white space characters. + + + + Sets the state of the JsonWriter, + + The JsonToken being written. + The value being written. + + + + Gets or sets a value indicating whether the underlying stream or + should be closed when the writer is closed. + + + true to close the underlying stream or when + the writer is closed; otherwise false. The default is true. + + + + + Gets the top. + + The top. + + + + Gets the state of the writer. + + + + + Gets the path of the writer. + + + + + Indicates how JSON text output is formatted. + + + + + Get or set how dates are written to JSON text. + + + + + Get or set how time zones are handling when writing JSON text. + + + + + Get or set how strings are escaped when writing JSON text. + + + + + Get or set how special floating point numbers, e.g. , + and , + are written to JSON text. + + + + + Get or set how and values are formatting when writing JSON text. + + + + + Gets or sets the culture used when writing JSON. Defaults to . + + + + + Initializes a new instance of the class. + + The stream. + + + + Initializes a new instance of the class. + + The writer. + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Writes the end. + + The token. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes raw JSON. + + The raw JSON to write. + + + + Writes raw JSON where a value is expected and updates the writer's state. + + The raw JSON to write. + + + + Writes the beginning of a JSON array. + + + + + Writes the beginning of a JSON object. + + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Closes this stream and the underlying stream. + + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value that represents a BSON object id. + + The Object ID value to write. + + + + Writes a BSON regex. + + The regex pattern. + The regex options. + + + + Gets or sets the used when writing values to BSON. + When set to no conversion will occur. + + The used when writing values to BSON. + + + + Represents a BSON Oid (object id). + + + + + Initializes a new instance of the class. + + The Oid value. + + + + Gets or sets the value of the Oid. + + The value of the Oid. + + + + Converts a binary value to and from a base 64 string value. + + + + + Converts an object to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + + Gets the of the JSON produced by the JsonConverter. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The of the JSON produced by the JsonConverter. + + + + Gets a value indicating whether this can read JSON. + + true if this can read JSON; otherwise, false. + + + + Gets a value indicating whether this can write JSON. + + true if this can write JSON; otherwise, false. + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts a to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified value type. + + Type of the value. + + true if this instance can convert the specified value type; otherwise, false. + + + + + Converts a to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified value type. + + Type of the value. + + true if this instance can convert the specified value type; otherwise, false. + + + + + Create a custom object + + The object type to convert. + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Creates an object which will then be populated by the serializer. + + Type of the object. + The created object. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Gets a value indicating whether this can write JSON. + + + true if this can write JSON; otherwise, false. + + + + + Provides a base class for converting a to and from JSON. + + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts a F# discriminated union type to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts an Entity Framework EntityKey to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts an ExpandoObject to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Gets a value indicating whether this can write JSON. + + + true if this can write JSON; otherwise, false. + + + + + Converts a to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts a to and from JSON and BSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts a to and from JSON and BSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts an to and from its name string value. + + + + + Initializes a new instance of the class. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Gets or sets a value indicating whether the written enum text should be camel case. + + true if the written enum text will be camel case; otherwise, false. + + + + Gets or sets a value indicating whether integer values are allowed. + + true if integers are allowed; otherwise, false. + + + + Specifies how constructors are used when initializing objects during deserialization by the . + + + + + First attempt to use the public default constructor, then fall back to single paramatized constructor, then the non-public default constructor. + + + + + Json.NET will use a non-public default constructor before falling back to a paramatized constructor. + + + + + Converts a to and from a string (e.g. "1.2.3.4"). + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing property value of the JSON that is being converted. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Specifies float format handling options when writing special floating point numbers, e.g. , + and with . + + + + + Write special floating point values as strings in JSON, e.g. "NaN", "Infinity", "-Infinity". + + + + + Write special floating point values as symbols in JSON, e.g. NaN, Infinity, -Infinity. + Note that this will produce non-valid JSON. + + + + + Write special floating point values as the property's default value in JSON, e.g. 0.0 for a property, null for a property. + + + + + Specifies how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Floating point numbers are parsed to . + + + + + Floating point numbers are parsed to . + + + + + Instructs the how to serialize the collection. + + + + + Instructs the how to serialize the object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + Gets or sets the id. + + The id. + + + + Gets or sets the title. + + The title. + + + + Gets or sets the description. + + The description. + + + + Gets the collection's items converter. + + The collection's items converter. + + + + The parameter list to use when constructing the JsonConverter described by ItemConverterType. + If null, the default constructor is used. + When non-null, there must be a constructor defined in the JsonConverter that exactly matches the number, + order, and type of these parameters. + + + [JsonContainer(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })] + + + + + Gets or sets a value that indicates whether to preserve object references. + + + true to keep object reference; otherwise, false. The default is false. + + + + + Gets or sets a value that indicates whether to preserve collection's items references. + + + true to keep collection's items object references; otherwise, false. The default is false. + + + + + Gets or sets the reference loop handling used when serializing the collection's items. + + The reference loop handling. + + + + Gets or sets the type name handling used when serializing the collection's items. + + The type name handling. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + The exception thrown when an error occurs during JSON serialization or deserialization. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Specifies how dates are formatted when writing JSON text. + + + + + Dates are written in the ISO 8601 format, e.g. "2012-03-21T05:40Z". + + + + + Dates are written in the Microsoft JSON format, e.g. "\/Date(1198908717056)\/". + + + + + Specifies how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON text. + + + + + Date formatted strings are not parsed to a date type and are read as strings. + + + + + Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . + + + + + Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . + + + + + Specifies how to treat the time value when converting between string and . + + + + + Treat as local time. If the object represents a Coordinated Universal Time (UTC), it is converted to the local time. + + + + + Treat as a UTC. If the object represents a local time, it is converted to a UTC. + + + + + Treat as a local time if a is being converted to a string. + If a string is being converted to , convert to a local time if a time zone is specified. + + + + + Time zone information should be preserved when converting. + + + + + Specifies formatting options for the . + + + + + No special formatting is applied. This is the default. + + + + + Causes child objects to be indented according to the and settings. + + + + + Instructs the to use the specified constructor when deserializing that object. + + + + + Instructs the to deserialize properties with no matching class member into the specified collection + and write values during serialization. + + + + + Initializes a new instance of the class. + + + + + Gets or sets a value that indicates whether to write extension data when serializing the object. + + + true to write extension data when serializing the object; otherwise, false. The default is true. + + + + + Gets or sets a value that indicates whether to read extension data when deserializing the object. + + + true to read extension data when deserializing the object; otherwise, false. The default is true. + + + + + Instructs the to always serialize the member, and require the member has a value. + + + + + Specifies the settings used when merging JSON. + + + + + Gets or sets the method used when merging JSON arrays. + + The method used when merging JSON arrays. + + + + Specifies how JSON arrays are merged together. + + + + Concatenate arrays. + + + Union arrays, skipping items that already exist. + + + Replace all array items. + + + Merge array items together, matched by index. + + + + Specifies metadata property handling options for the . + + + + + Read metadata properties located at the start of a JSON object. + + + + + Read metadata properties located anywhere in a JSON object. Note that this setting will impact performance. + + + + + Do not try to read metadata properties. + + + + + Represents a trace writer that writes to the application's instances. + + + + + Represents a trace writer. + + + + + Writes the specified trace level, message and optional exception. + + The at which to write this trace. + The trace message. + The trace exception. This parameter is optional. + + + + Gets the that will be used to filter the trace messages passed to the writer. + For example a filter level of Info will exclude Verbose messages and include Info, + Warning and Error messages. + + The that will be used to filter the trace messages passed to the writer. + + + + Writes the specified trace level, message and optional exception. + + The at which to write this trace. + The trace message. + The trace exception. This parameter is optional. + + + + Gets the that will be used to filter the trace messages passed to the writer. + For example a filter level of Info will exclude Verbose messages and include Info, + Warning and Error messages. + + + The that will be used to filter the trace messages passed to the writer. + + + + + Get and set values for a using dynamic methods. + + + + + Provides methods to get and set values. + + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + Initializes a new instance of the class. + + The member info. + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + Provides methods to get attributes. + + + + + Returns a collection of all of the attributes, or an empty collection if there are no attributes. + + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Returns a collection of attributes, identified by type, or an empty collection if there are no attributes. + + The type of the attributes. + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Contract details for a used by the . + + + + + Contract details for a used by the . + + + + + Gets the underlying type for the contract. + + The underlying type for the contract. + + + + Gets or sets the type created during deserialization. + + The type created during deserialization. + + + + Gets or sets whether this type contract is serialized as a reference. + + Whether this type contract is serialized as a reference. + + + + Gets or sets the default for this contract. + + The converter. + + + + Gets or sets all methods called immediately after deserialization of the object. + + The methods called immediately after deserialization of the object. + + + + Gets or sets all methods called during deserialization of the object. + + The methods called during deserialization of the object. + + + + Gets or sets all methods called after serialization of the object graph. + + The methods called after serialization of the object graph. + + + + Gets or sets all methods called before serialization of the object. + + The methods called before serialization of the object. + + + + Gets or sets all method called when an error is thrown during the serialization of the object. + + The methods called when an error is thrown during the serialization of the object. + + + + Gets or sets the method called immediately after deserialization of the object. + + The method called immediately after deserialization of the object. + + + + Gets or sets the method called during deserialization of the object. + + The method called during deserialization of the object. + + + + Gets or sets the method called after serialization of the object graph. + + The method called after serialization of the object graph. + + + + Gets or sets the method called before serialization of the object. + + The method called before serialization of the object. + + + + Gets or sets the method called when an error is thrown during the serialization of the object. + + The method called when an error is thrown during the serialization of the object. + + + + Gets or sets the default creator method used to create the object. + + The default creator method used to create the object. + + + + Gets or sets a value indicating whether the default creator is non public. + + true if the default object creator is non-public; otherwise, false. + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets or sets the default collection items . + + The converter. + + + + Gets or sets a value indicating whether the collection items preserve object references. + + true if collection items preserve object references; otherwise, false. + + + + Gets or sets the collection item reference loop handling. + + The reference loop handling. + + + + Gets or sets the collection item type name handling. + + The type name handling. + + + + Represents a trace writer that writes to memory. When the trace message limit is + reached then old trace messages will be removed as new messages are added. + + + + + Initializes a new instance of the class. + + + + + Writes the specified trace level, message and optional exception. + + The at which to write this trace. + The trace message. + The trace exception. This parameter is optional. + + + + Returns an enumeration of the most recent trace messages. + + An enumeration of the most recent trace messages. + + + + Returns a of the most recent trace messages. + + + A of the most recent trace messages. + + + + + Gets the that will be used to filter the trace messages passed to the writer. + For example a filter level of Info will exclude Verbose messages and include Info, + Warning and Error messages. + + + The that will be used to filter the trace messages passed to the writer. + + + + + Provides methods to get attributes from a , , or . + + + + + Initializes a new instance of the class. + + The instance to get attributes for. This parameter should be a , , or . + + + + Returns a collection of all of the attributes, or an empty collection if there are no attributes. + + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Returns a collection of attributes, identified by type, or an empty collection if there are no attributes. + + The type of the attributes. + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Provides an interface to enable a class to return line and position information. + + + + + Gets a value indicating whether the class can return line information. + + + true if LineNumber and LinePosition can be provided; otherwise, false. + + + + + Gets the current line number. + + The current line number or 0 if no line information is available (for example, HasLineInfo returns false). + + + + Gets the current line position. + + The current line position or 0 if no line information is available (for example, HasLineInfo returns false). + + + + Specifies how strings are escaped when writing JSON text. + + + + + Only control characters (e.g. newline) are escaped. + + + + + All non-ASCII and control characters (e.g. newline) are escaped. + + + + + HTML (<, >, &, ', ") and control characters (e.g. newline) are escaped. + + + + + Represents a raw JSON string. + + + + + Represents a value in JSON (string, integer, date, etc). + + + + + Represents an abstract JSON token. + + + + + Represents a collection of objects. + + The type of token + + + + Gets the with the specified key. + + + + + + Compares the values of two tokens, including the values of all descendant tokens. + + The first to compare. + The second to compare. + true if the tokens are equal; otherwise false. + + + + Adds the specified content immediately after this token. + + A content object that contains simple content or a collection of content objects to be added after this token. + + + + Adds the specified content immediately before this token. + + A content object that contains simple content or a collection of content objects to be added before this token. + + + + Returns a collection of the ancestor tokens of this token. + + A collection of the ancestor tokens of this token. + + + + Returns a collection of tokens that contain this token, and the ancestors of this token. + + A collection of tokens that contain this token, and the ancestors of this token. + + + + Returns a collection of the sibling tokens after this token, in document order. + + A collection of the sibling tokens after this tokens, in document order. + + + + Returns a collection of the sibling tokens before this token, in document order. + + A collection of the sibling tokens before this token, in document order. + + + + Gets the with the specified key converted to the specified type. + + The type to convert the token to. + The token key. + The converted token value. + + + + Returns a collection of the child tokens of this token, in document order. + + An of containing the child tokens of this , in document order. + + + + Returns a collection of the child tokens of this token, in document order, filtered by the specified type. + + The type to filter the child tokens on. + A containing the child tokens of this , in document order. + + + + Returns a collection of the child values of this token, in document order. + + The type to convert the values to. + A containing the child values of this , in document order. + + + + Removes this token from its parent. + + + + + Replaces this token with the specified token. + + The value. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Returns the indented JSON for this token. + + + The indented JSON for this token. + + + + + Returns the JSON for this token using the given formatting and converters. + + Indicates how the output is formatted. + A collection of which will be used when writing the token. + The JSON for this token using the given formatting and converters. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to []. + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from [] to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Creates an for this token. + + An that can be used to read this token and its descendants. + + + + Creates a from an object. + + The object that will be used to create . + A with the value of the specified object + + + + Creates a from an object using the specified . + + The object that will be used to create . + The that will be used when reading the object. + A with the value of the specified object + + + + Creates the specified .NET type from the . + + The object type that the token will be deserialized to. + The new object created from the JSON value. + + + + Creates the specified .NET type from the . + + The object type that the token will be deserialized to. + The new object created from the JSON value. + + + + Creates the specified .NET type from the using the specified . + + The object type that the token will be deserialized to. + The that will be used when creating the object. + The new object created from the JSON value. + + + + Creates the specified .NET type from the using the specified . + + The object type that the token will be deserialized to. + The that will be used when creating the object. + The new object created from the JSON value. + + + + Creates a from a . + + An positioned at the token to read into this . + + An that contains the token and its descendant tokens + that were read from the reader. The runtime type of the token is determined + by the token type of the first token encountered in the reader. + + + + + Load a from a string that contains JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + Creates a from a . + + An positioned at the token to read into this . + + An that contains the token and its descendant tokens + that were read from the reader. The runtime type of the token is determined + by the token type of the first token encountered in the reader. + + + + + Selects a using a JPath expression. Selects the token that matches the object path. + + + A that contains a JPath expression. + + A , or null. + + + + Selects a using a JPath expression. Selects the token that matches the object path. + + + A that contains a JPath expression. + + A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. + A . + + + + Selects a collection of elements using a JPath expression. + + + A that contains a JPath expression. + + An that contains the selected elements. + + + + Selects a collection of elements using a JPath expression. + + + A that contains a JPath expression. + + A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. + An that contains the selected elements. + + + + Returns the responsible for binding operations performed on this object. + + The expression tree representation of the runtime value. + + The to bind this object. + + + + + Returns the responsible for binding operations performed on this object. + + The expression tree representation of the runtime value. + + The to bind this object. + + + + + Creates a new instance of the . All child tokens are recursively cloned. + + A new instance of the . + + + + Adds an object to the annotation list of this . + + The annotation to add. + + + + Get the first annotation object of the specified type from this . + + The type of the annotation to retrieve. + The first annotation object that matches the specified type, or null if no annotation is of the specified type. + + + + Gets the first annotation object of the specified type from this . + + The of the annotation to retrieve. + The first annotation object that matches the specified type, or null if no annotation is of the specified type. + + + + Gets a collection of annotations of the specified type for this . + + The type of the annotations to retrieve. + An that contains the annotations for this . + + + + Gets a collection of annotations of the specified type for this . + + The of the annotations to retrieve. + An of that contains the annotations that match the specified type for this . + + + + Removes the annotations of the specified type from this . + + The type of annotations to remove. + + + + Removes the annotations of the specified type from this . + + The of annotations to remove. + + + + Gets a comparer that can compare two tokens for value equality. + + A that can compare two nodes for value equality. + + + + Gets or sets the parent. + + The parent. + + + + Gets the root of this . + + The root of this . + + + + Gets the node type for this . + + The type. + + + + Gets a value indicating whether this token has child tokens. + + + true if this token has child values; otherwise, false. + + + + + Gets the next sibling token of this node. + + The that contains the next sibling token. + + + + Gets the previous sibling token of this node. + + The that contains the previous sibling token. + + + + Gets the path of the JSON token. + + + + + Gets the with the specified key. + + The with the specified key. + + + + Get the first child token of this token. + + A containing the first child token of the . + + + + Get the last child token of this token. + + A containing the last child token of the . + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Creates a comment with the given value. + + The value. + A comment with the given value. + + + + Creates a string with the given value. + + The value. + A string with the given value. + + + + Creates a null value. + + A null value. + + + + Creates a null value. + + A null value. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Indicates whether the current object is equal to another object of the same type. + + + true if the current object is equal to the parameter; otherwise, false. + + An object to compare with this object. + + + + Determines whether the specified is equal to the current . + + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + + The parameter is null. + + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The format. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The format provider. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The format. + The format provider. + + A that represents this instance. + + + + + Returns the responsible for binding operations performed on this object. + + The expression tree representation of the runtime value. + + The to bind this object. + + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings: + Value + Meaning + Less than zero + This instance is less than . + Zero + This instance is equal to . + Greater than zero + This instance is greater than . + + + is not the same type as this instance. + + + + + Gets a value indicating whether this token has child tokens. + + + true if this token has child values; otherwise, false. + + + + + Gets the node type for this . + + The type. + + + + Gets or sets the underlying token value. + + The underlying token value. + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class. + + The raw json. + + + + Creates an instance of with the content of the reader's current token. + + The reader. + An instance of with the content of the reader's current token. + + + + Indicating whether a property is required. + + + + + The property is not required. The default state. + + + + + The property must be defined in JSON but can be a null value. + + + + + The property must be defined in JSON and cannot be a null value. + + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets the object's properties. + + The object's properties. + + + + Gets or sets the property name resolver. + + The property name resolver. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets or sets the ISerializable object constructor. + + The ISerializable object constructor. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Get and set values for a using dynamic methods. + + + + + Initializes a new instance of the class. + + The member info. + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + Provides data for the Error event. + + + + + Initializes a new instance of the class. + + The current object. + The error context. + + + + Gets the current object the error event is being raised against. + + The current object the error event is being raised against. + + + + Gets the error context. + + The error context. + + + + Represents a view of a . + + + + + Initializes a new instance of the class. + + The name. + + + + When overridden in a derived class, returns whether resetting an object changes its value. + + + true if resetting the component changes its value; otherwise, false. + + The component to test for reset capability. + + + + + When overridden in a derived class, gets the current value of the property on a component. + + + The value of a property for a given component. + + The component with the property for which to retrieve the value. + + + + + When overridden in a derived class, resets the value for this property of the component to the default value. + + The component with the property value that is to be reset to the default value. + + + + + When overridden in a derived class, sets the value of the component to a different value. + + The component with the property value that is to be set. + The new value. + + + + + When overridden in a derived class, determines a value indicating whether the value of this property needs to be persisted. + + + true if the property should be persisted; otherwise, false. + + The component with the property to be examined for persistence. + + + + + When overridden in a derived class, gets the type of the component this property is bound to. + + + A that represents the type of component this property is bound to. When the or methods are invoked, the object specified might be an instance of this type. + + + + + When overridden in a derived class, gets a value indicating whether this property is read-only. + + + true if the property is read-only; otherwise, false. + + + + + When overridden in a derived class, gets the type of the property. + + + A that represents the type of the property. + + + + + Gets the hash code for the name of the member. + + + + The hash code for the name of the member. + + + + + Used to resolve references when serializing and deserializing JSON by the . + + + + + Resolves a reference to its object. + + The serialization context. + The reference to resolve. + The object that + + + + Gets the reference for the sepecified object. + + The serialization context. + The object to get a reference for. + The reference to the object. + + + + Determines whether the specified object is referenced. + + The serialization context. + The object to test for a reference. + + true if the specified object is referenced; otherwise, false. + + + + + Adds a reference to the specified object. + + The serialization context. + The reference. + The object to reference. + + + + Specifies reference handling options for the . + Note that references cannot be preserved when a value is set via a non-default constructor such as types that implement ISerializable. + + + + + + + + Do not preserve references when serializing types. + + + + + Preserve references when serializing into a JSON object structure. + + + + + Preserve references when serializing into a JSON array structure. + + + + + Preserve references when serializing. + + + + + Instructs the how to serialize the collection. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with a flag indicating whether the array can contain null items + + A flag indicating whether the array can contain null items. + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + Gets or sets a value indicating whether null items are allowed in the collection. + + true if null items are allowed in the collection; otherwise, false. + + + + Specifies default value handling options for the . + + + + + + + + + Include members where the member value is the same as the member's default value when serializing objects. + Included members are written to JSON. Has no effect when deserializing. + + + + + Ignore members where the member value is the same as the member's default value when serializing objects + so that is is not written to JSON. + This option will ignore all default values (e.g. null for objects and nullable types; 0 for integers, + decimals and floating point numbers; and false for booleans). The default value ignored can be changed by + placing the on the property. + + + + + Members with a default value but no JSON will be set to their default value when deserializing. + + + + + Ignore members where the member value is the same as the member's default value when serializing objects + and sets members to their default value when deserializing. + + + + + Instructs the to use the specified when serializing the member or class. + + + + + Initializes a new instance of the class. + + Type of the converter. + + + + Initializes a new instance of the class. + + Type of the converter. + Parameter list to use when constructing the JsonConverter. Can be null. + + + + Gets the of the converter. + + The of the converter. + + + + The parameter list to use when constructing the JsonConverter described by ConverterType. + If null, the default constructor is used. + + + + + Instructs the how to serialize the object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified member serialization. + + The member serialization. + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + Gets or sets the member serialization. + + The member serialization. + + + + Gets or sets a value that indicates whether the object's properties are required. + + + A value indicating whether the object's properties are required. + + + + + Specifies the settings on a object. + + + + + Initializes a new instance of the class. + + + + + Gets or sets how reference loops (e.g. a class referencing itself) is handled. + + Reference loop handling. + + + + Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. + + Missing member handling. + + + + Gets or sets how objects are created during deserialization. + + The object creation handling. + + + + Gets or sets how null values are handled during serialization and deserialization. + + Null value handling. + + + + Gets or sets how null default are handled during serialization and deserialization. + + The default value handling. + + + + Gets or sets a collection that will be used during serialization. + + The converters. + + + + Gets or sets how object references are preserved by the serializer. + + The preserve references handling. + + + + Gets or sets how type name writing and reading is handled by the serializer. + + The type name handling. + + + + Gets or sets how metadata properties are used during deserialization. + + The metadata properties handling. + + + + Gets or sets how a type name assembly is written and resolved by the serializer. + + The type name assembly format. + + + + Gets or sets how constructors are used during deserialization. + + The constructor handling. + + + + Gets or sets the contract resolver used by the serializer when + serializing .NET objects to JSON and vice versa. + + The contract resolver. + + + + Gets or sets the equality comparer used by the serializer when comparing references. + + The equality comparer. + + + + Gets or sets the used by the serializer when resolving references. + + The reference resolver. + + + + Gets or sets a function that creates the used by the serializer when resolving references. + + A function that creates the used by the serializer when resolving references. + + + + Gets or sets the used by the serializer when writing trace messages. + + The trace writer. + + + + Gets or sets the used by the serializer when resolving type names. + + The binder. + + + + Gets or sets the error handler called during serialization and deserialization. + + The error handler called during serialization and deserialization. + + + + Gets or sets the used by the serializer when invoking serialization callback methods. + + The context. + + + + Get or set how and values are formatted when writing JSON text, and the expected date format when reading JSON text. + + + + + Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + + + + + Indicates how JSON text output is formatted. + + + + + Get or set how dates are written to JSON text. + + + + + Get or set how time zones are handling during serialization and deserialization. + + + + + Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. + + + + + Get or set how special floating point numbers, e.g. , + and , + are written as JSON. + + + + + Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Get or set how strings are escaped when writing JSON text. + + + + + Gets or sets the culture used when reading JSON. Defaults to . + + + + + Gets a value indicating whether there will be a check for additional content after deserializing an object. + + + true if there will be a check for additional content after deserializing an object; otherwise, false. + + + + + + Represents a reader that provides validation. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Initializes a new instance of the class that + validates the content returned from the given . + + The to read from while validating. + + + + Reads the next JSON token from the stream as a . + + A . + + + + Reads the next JSON token from the stream as a []. + + + A [] or a null reference if the next JSON token is null. + + + + + Reads the next JSON token from the stream as a . + + A . + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Sets an event handler for receiving schema validation errors. + + + + + Gets the text value of the current JSON token. + + + + + + Gets the depth of the current token in the JSON document. + + The depth of the current token in the JSON document. + + + + Gets the path of the current JSON token. + + + + + Gets the quotation mark character used to enclose the value of a string. + + + + + + Gets the type of the current JSON token. + + + + + + Gets the Common Language Runtime (CLR) type for the current JSON token. + + + + + + Gets or sets the schema. + + The schema. + + + + Gets the used to construct this . + + The specified in the constructor. + + + + Compares tokens to determine whether they are equal. + + + + + Determines whether the specified objects are equal. + + The first object of type to compare. + The second object of type to compare. + + true if the specified objects are equal; otherwise, false. + + + + + Returns a hash code for the specified object. + + The for which a hash code is to be returned. + A hash code for the specified object. + The type of is a reference type and is null. + + + + Specifies the member serialization options for the . + + + + + All public members are serialized by default. Members can be excluded using or . + This is the default member serialization mode. + + + + + Only members must be marked with or are serialized. + This member serialization mode can also be set by marking the class with . + + + + + All public and private fields are serialized. Members can be excluded using or . + This member serialization mode can also be set by marking the class with + and setting IgnoreSerializableAttribute on to false. + + + + + Specifies how object creation is handled by the . + + + + + Reuse existing objects, create new objects when needed. + + + + + Only reuse existing objects. + + + + + Always create new objects. + + + + + Converts a to and from the ISO 8601 date format (e.g. 2008-04-12T12:53Z). + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Gets or sets the date time styles used when converting a date to and from JSON. + + The date time styles used when converting a date to and from JSON. + + + + Gets or sets the date time format used when converting a date to and from JSON. + + The date time format used when converting a date to and from JSON. + + + + Gets or sets the culture used when converting a date to and from JSON. + + The culture used when converting a date to and from JSON. + + + + Converts a to and from a JavaScript date constructor (e.g. new Date(52231943)). + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing property value of the JSON that is being converted. + The calling serializer. + The object value. + + + + Converts XML to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The calling serializer. + The value. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Checks if the attributeName is a namespace attribute. + + Attribute name to test. + The attribute name prefix if it has one, otherwise an empty string. + True if attribute name is for a namespace attribute, otherwise false. + + + + Determines whether this instance can convert the specified value type. + + Type of the value. + + true if this instance can convert the specified value type; otherwise, false. + + + + + Gets or sets the name of the root element to insert when deserializing to XML if the JSON structure has produces multiple root elements. + + The name of the deserialize root element. + + + + Gets or sets a flag to indicate whether to write the Json.NET array attribute. + This attribute helps preserve arrays when converting the written XML back to JSON. + + true if the array attibute is written to the XML; otherwise, false. + + + + Gets or sets a value indicating whether to write the root JSON object. + + true if the JSON root object is omitted; otherwise, false. + + + + Represents a reader that provides fast, non-cached, forward-only access to JSON text data. + + + + + Initializes a new instance of the class with the specified . + + The TextReader containing the XML data to read. + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Reads the next JSON token from the stream as a []. + + + A [] or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Changes the state to closed. + + + + + Gets a value indicating whether the class can return line information. + + + true if LineNumber and LinePosition can be provided; otherwise, false. + + + + + Gets the current line number. + + + The current line number or 0 if no line information is available (for example, HasLineInfo returns false). + + + + + Gets the current line position. + + + The current line position or 0 if no line information is available (for example, HasLineInfo returns false). + + + + + Instructs the to always serialize the member with the specified name. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified name. + + Name of the property. + + + + Gets or sets the converter used when serializing the property's collection items. + + The collection's items converter. + + + + The parameter list to use when constructing the JsonConverter described by ItemConverterType. + If null, the default constructor is used. + When non-null, there must be a constructor defined in the JsonConverter that exactly matches the number, + order, and type of these parameters. + + + [JsonProperty(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })] + + + + + Gets or sets the null value handling used when serializing this property. + + The null value handling. + + + + Gets or sets the default value handling used when serializing this property. + + The default value handling. + + + + Gets or sets the reference loop handling used when serializing this property. + + The reference loop handling. + + + + Gets or sets the object creation handling used when deserializing this property. + + The object creation handling. + + + + Gets or sets the type name handling used when serializing this property. + + The type name handling. + + + + Gets or sets whether this property's value is serialized as a reference. + + Whether this property's value is serialized as a reference. + + + + Gets or sets the order of serialization and deserialization of a member. + + The numeric order of serialization or deserialization. + + + + Gets or sets a value indicating whether this property is required. + + + A value indicating whether this property is required. + + + + + Gets or sets the name of the property. + + The name of the property. + + + + Gets or sets the the reference loop handling used when serializing the property's collection items. + + The collection's items reference loop handling. + + + + Gets or sets the the type name handling used when serializing the property's collection items. + + The collection's items type name handling. + + + + Gets or sets whether this property's collection items are serialized as a reference. + + Whether this property's collection items are serialized as a reference. + + + + Instructs the not to serialize the public field or public read/write property value. + + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Creates an instance of the JsonWriter class using the specified . + + The TextWriter to write to. + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Closes this stream and the underlying stream. + + + + + Writes the beginning of a JSON object. + + + + + Writes the beginning of a JSON array. + + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes the specified end token. + + The end token to write. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + A flag to indicate whether the text should be escaped when it is written as a JSON property name. + + + + Writes indent characters. + + + + + Writes the JSON value delimiter. + + + + + Writes an indent space. + + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes raw JSON. + + The raw JSON to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes out the given white space. + + The string of white space characters. + + + + Gets or sets how many IndentChars to write for each level in the hierarchy when is set to Formatting.Indented. + + + + + Gets or sets which character to use to quote attribute values. + + + + + Gets or sets which character to use for indenting when is set to Formatting.Indented. + + + + + Gets or sets a value indicating whether object names will be surrounded with quotes. + + + + + The exception thrown when an error occurs while reading JSON text. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Gets the path to the JSON where the error occurred. + + The path to the JSON where the error occurred. + + + + The exception thrown when an error occurs while reading JSON text. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Gets the line number indicating where the error occurred. + + The line number indicating where the error occurred. + + + + Gets the line position indicating where the error occurred. + + The line position indicating where the error occurred. + + + + Gets the path to the JSON where the error occurred. + + The path to the JSON where the error occurred. + + + + Represents a collection of . + + + + + Provides methods for converting between common language runtime types and JSON types. + + + + + + + + Represents JavaScript's boolean value true as a string. This field is read-only. + + + + + Represents JavaScript's boolean value false as a string. This field is read-only. + + + + + Represents JavaScript's null as a string. This field is read-only. + + + + + Represents JavaScript's undefined as a string. This field is read-only. + + + + + Represents JavaScript's positive infinity as a string. This field is read-only. + + + + + Represents JavaScript's negative infinity as a string. This field is read-only. + + + + + Represents JavaScript's NaN as a string. This field is read-only. + + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation using the specified. + + The value to convert. + The format the date will be converted to. + The time zone handling when the date is converted to a string. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation using the specified. + + The value to convert. + The format the date will be converted to. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + The string delimiter character. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + The string delimiter character. + The string escape handling. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Serializes the specified object to a JSON string. + + The object to serialize. + A JSON string representation of the object. + + + + Serializes the specified object to a JSON string using formatting. + + The object to serialize. + Indicates how the output is formatted. + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using a collection of . + + The object to serialize. + A collection converters used while serializing. + A JSON string representation of the object. + + + + Serializes the specified object to a JSON string using formatting and a collection of . + + The object to serialize. + Indicates how the output is formatted. + A collection converters used while serializing. + A JSON string representation of the object. + + + + Serializes the specified object to a JSON string using . + + The object to serialize. + The used to serialize the object. + If this is null, default serialization settings will be used. + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using a type, formatting and . + + The object to serialize. + The used to serialize the object. + If this is null, default serialization settings will be used. + + The type of the value being serialized. + This parameter is used when is Auto to write out the type name if the type of the value does not match. + Specifing the type is optional. + + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using formatting and . + + The object to serialize. + Indicates how the output is formatted. + The used to serialize the object. + If this is null, default serialization settings will be used. + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using a type, formatting and . + + The object to serialize. + Indicates how the output is formatted. + The used to serialize the object. + If this is null, default serialization settings will be used. + + The type of the value being serialized. + This parameter is used when is Auto to write out the type name if the type of the value does not match. + Specifing the type is optional. + + + A JSON string representation of the object. + + + + + Asynchronously serializes the specified object to a JSON string. + Serialization will happen on a new thread. + + The object to serialize. + + A task that represents the asynchronous serialize operation. The value of the TResult parameter contains a JSON string representation of the object. + + + + + Asynchronously serializes the specified object to a JSON string using formatting. + Serialization will happen on a new thread. + + The object to serialize. + Indicates how the output is formatted. + + A task that represents the asynchronous serialize operation. The value of the TResult parameter contains a JSON string representation of the object. + + + + + Asynchronously serializes the specified object to a JSON string using formatting and a collection of . + Serialization will happen on a new thread. + + The object to serialize. + Indicates how the output is formatted. + The used to serialize the object. + If this is null, default serialization settings will be used. + + A task that represents the asynchronous serialize operation. The value of the TResult parameter contains a JSON string representation of the object. + + + + + Deserializes the JSON to a .NET object. + + The JSON to deserialize. + The deserialized object from the JSON string. + + + + Deserializes the JSON to a .NET object using . + + The JSON to deserialize. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type. + + The JSON to deserialize. + The of object being deserialized. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type. + + The type of the object to deserialize to. + The JSON to deserialize. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the given anonymous type. + + + The anonymous type to deserialize to. This can't be specified + traditionally and must be infered from the anonymous type passed + as a parameter. + + The JSON to deserialize. + The anonymous type object. + The deserialized anonymous type from the JSON string. + + + + Deserializes the JSON to the given anonymous type using . + + + The anonymous type to deserialize to. This can't be specified + traditionally and must be infered from the anonymous type passed + as a parameter. + + The JSON to deserialize. + The anonymous type object. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized anonymous type from the JSON string. + + + + Deserializes the JSON to the specified .NET type using a collection of . + + The type of the object to deserialize to. + The JSON to deserialize. + Converters to use while deserializing. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type using . + + The type of the object to deserialize to. + The object to deserialize. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type using a collection of . + + The JSON to deserialize. + The type of the object to deserialize. + Converters to use while deserializing. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type using . + + The JSON to deserialize. + The type of the object to deserialize to. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized object from the JSON string. + + + + Asynchronously deserializes the JSON to the specified .NET type. + Deserialization will happen on a new thread. + + The type of the object to deserialize to. + The JSON to deserialize. + + A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. + + + + + Asynchronously deserializes the JSON to the specified .NET type using . + Deserialization will happen on a new thread. + + The type of the object to deserialize to. + The JSON to deserialize. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + + A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. + + + + + Asynchronously deserializes the JSON to the specified .NET type. + Deserialization will happen on a new thread. + + The JSON to deserialize. + + A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. + + + + + Asynchronously deserializes the JSON to the specified .NET type using . + Deserialization will happen on a new thread. + + The JSON to deserialize. + The type of the object to deserialize to. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + + A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. + + + + + Populates the object with values from the JSON string. + + The JSON to populate values from. + The target object to populate values onto. + + + + Populates the object with values from the JSON string using . + + The JSON to populate values from. + The target object to populate values onto. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + + + + Asynchronously populates the object with values from the JSON string using . + + The JSON to populate values from. + The target object to populate values onto. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + + A task that represents the asynchronous populate operation. + + + + + Serializes the XML node to a JSON string. + + The node to serialize. + A JSON string of the XmlNode. + + + + Serializes the XML node to a JSON string using formatting. + + The node to serialize. + Indicates how the output is formatted. + A JSON string of the XmlNode. + + + + Serializes the XML node to a JSON string using formatting and omits the root object if is true. + + The node to serialize. + Indicates how the output is formatted. + Omits writing the root object. + A JSON string of the XmlNode. + + + + Deserializes the XmlNode from a JSON string. + + The JSON string. + The deserialized XmlNode + + + + Deserializes the XmlNode from a JSON string nested in a root elment specified by . + + The JSON string. + The name of the root element to append when deserializing. + The deserialized XmlNode + + + + Deserializes the XmlNode from a JSON string nested in a root elment specified by + and writes a .NET array attribute for collections. + + The JSON string. + The name of the root element to append when deserializing. + + A flag to indicate whether to write the Json.NET array attribute. + This attribute helps preserve arrays when converting the written XML back to JSON. + + The deserialized XmlNode + + + + Serializes the to a JSON string. + + The node to convert to JSON. + A JSON string of the XNode. + + + + Serializes the to a JSON string using formatting. + + The node to convert to JSON. + Indicates how the output is formatted. + A JSON string of the XNode. + + + + Serializes the to a JSON string using formatting and omits the root object if is true. + + The node to serialize. + Indicates how the output is formatted. + Omits writing the root object. + A JSON string of the XNode. + + + + Deserializes the from a JSON string. + + The JSON string. + The deserialized XNode + + + + Deserializes the from a JSON string nested in a root elment specified by . + + The JSON string. + The name of the root element to append when deserializing. + The deserialized XNode + + + + Deserializes the from a JSON string nested in a root elment specified by + and writes a .NET array attribute for collections. + + The JSON string. + The name of the root element to append when deserializing. + + A flag to indicate whether to write the Json.NET array attribute. + This attribute helps preserve arrays when converting the written XML back to JSON. + + The deserialized XNode + + + + Gets or sets a function that creates default . + Default settings are automatically used by serialization methods on , + and and on . + To serialize without using any default settings create a with + . + + + + + The exception thrown when an error occurs during JSON serialization or deserialization. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Serializes and deserializes objects into and from the JSON format. + The enables you to control how objects are encoded into JSON. + + + + + Initializes a new instance of the class. + + + + + Creates a new instance. + The will not use default settings. + + + A new instance. + The will not use default settings. + + + + + Creates a new instance using the specified . + The will not use default settings. + + The settings to be applied to the . + + A new instance using the specified . + The will not use default settings. + + + + + Creates a new instance. + The will use default settings. + + + A new instance. + The will use default settings. + + + + + Creates a new instance using the specified . + The will use default settings. + + The settings to be applied to the . + + A new instance using the specified . + The will use default settings. + + + + + Populates the JSON values onto the target object. + + The that contains the JSON structure to reader values from. + The target object to populate values onto. + + + + Populates the JSON values onto the target object. + + The that contains the JSON structure to reader values from. + The target object to populate values onto. + + + + Deserializes the JSON structure contained by the specified . + + The that contains the JSON structure to deserialize. + The being deserialized. + + + + Deserializes the JSON structure contained by the specified + into an instance of the specified type. + + The containing the object. + The of object being deserialized. + The instance of being deserialized. + + + + Deserializes the JSON structure contained by the specified + into an instance of the specified type. + + The containing the object. + The type of the object to deserialize. + The instance of being deserialized. + + + + Deserializes the JSON structure contained by the specified + into an instance of the specified type. + + The containing the object. + The of object being deserialized. + The instance of being deserialized. + + + + Serializes the specified and writes the JSON structure + to a Stream using the specified . + + The used to write the JSON structure. + The to serialize. + + + + Serializes the specified and writes the JSON structure + to a Stream using the specified . + + The used to write the JSON structure. + The to serialize. + + The type of the value being serialized. + This parameter is used when is Auto to write out the type name if the type of the value does not match. + Specifing the type is optional. + + + + + Serializes the specified and writes the JSON structure + to a Stream using the specified . + + The used to write the JSON structure. + The to serialize. + + The type of the value being serialized. + This parameter is used when is Auto to write out the type name if the type of the value does not match. + Specifing the type is optional. + + + + + Serializes the specified and writes the JSON structure + to a Stream using the specified . + + The used to write the JSON structure. + The to serialize. + + + + Occurs when the errors during serialization and deserialization. + + + + + Gets or sets the used by the serializer when resolving references. + + + + + Gets or sets the used by the serializer when resolving type names. + + + + + Gets or sets the used by the serializer when writing trace messages. + + The trace writer. + + + + Gets or sets the equality comparer used by the serializer when comparing references. + + The equality comparer. + + + + Gets or sets how type name writing and reading is handled by the serializer. + + + + + Gets or sets how a type name assembly is written and resolved by the serializer. + + The type name assembly format. + + + + Gets or sets how object references are preserved by the serializer. + + + + + Get or set how reference loops (e.g. a class referencing itself) is handled. + + + + + Get or set how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. + + + + + Get or set how null values are handled during serialization and deserialization. + + + + + Get or set how null default are handled during serialization and deserialization. + + + + + Gets or sets how objects are created during deserialization. + + The object creation handling. + + + + Gets or sets how constructors are used during deserialization. + + The constructor handling. + + + + Gets or sets how metadata properties are used during deserialization. + + The metadata properties handling. + + + + Gets a collection that will be used during serialization. + + Collection that will be used during serialization. + + + + Gets or sets the contract resolver used by the serializer when + serializing .NET objects to JSON and vice versa. + + + + + Gets or sets the used by the serializer when invoking serialization callback methods. + + The context. + + + + Indicates how JSON text output is formatted. + + + + + Get or set how dates are written to JSON text. + + + + + Get or set how time zones are handling during serialization and deserialization. + + + + + Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. + + + + + Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Get or set how special floating point numbers, e.g. , + and , + are written as JSON text. + + + + + Get or set how strings are escaped when writing JSON text. + + + + + Get or set how and values are formatted when writing JSON text, and the expected date format when reading JSON text. + + + + + Gets or sets the culture used when reading JSON. Defaults to . + + + + + Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + + + + + Gets a value indicating whether there will be a check for additional JSON content after deserializing an object. + + + true if there will be a check for additional JSON content after deserializing an object; otherwise, false. + + + + + Contains the LINQ to JSON extension methods. + + + + + Returns a collection of tokens that contains the ancestors of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains the ancestors of every token in the source collection. + + + + Returns a collection of tokens that contains every token in the source collection, and the ancestors of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains every token in the source collection, the ancestors of every token in the source collection. + + + + Returns a collection of tokens that contains the descendants of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains the descendants of every token in the source collection. + + + + Returns a collection of tokens that contains every token in the source collection, and the descendants of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains every token in the source collection, and the descendants of every token in the source collection. + + + + Returns a collection of child properties of every object in the source collection. + + An of that contains the source collection. + An of that contains the properties of every object in the source collection. + + + + Returns a collection of child values of every object in the source collection with the given key. + + An of that contains the source collection. + The token key. + An of that contains the values of every token in the source collection with the given key. + + + + Returns a collection of child values of every object in the source collection. + + An of that contains the source collection. + An of that contains the values of every token in the source collection. + + + + Returns a collection of converted child values of every object in the source collection with the given key. + + The type to convert the values to. + An of that contains the source collection. + The token key. + An that contains the converted values of every token in the source collection with the given key. + + + + Returns a collection of converted child values of every object in the source collection. + + The type to convert the values to. + An of that contains the source collection. + An that contains the converted values of every token in the source collection. + + + + Converts the value. + + The type to convert the value to. + A cast as a of . + A converted value. + + + + Converts the value. + + The source collection type. + The type to convert the value to. + A cast as a of . + A converted value. + + + + Returns a collection of child tokens of every array in the source collection. + + The source collection type. + An of that contains the source collection. + An of that contains the values of every token in the source collection. + + + + Returns a collection of converted child tokens of every array in the source collection. + + An of that contains the source collection. + The type to convert the values to. + The source collection type. + An that contains the converted values of every token in the source collection. + + + + Returns the input typed as . + + An of that contains the source collection. + The input typed as . + + + + Returns the input typed as . + + The source collection type. + An of that contains the source collection. + The input typed as . + + + + Represents a JSON constructor. + + + + + Represents a token that can contain other tokens. + + + + + Raises the event. + + The instance containing the event data. + + + + Raises the event. + + The instance containing the event data. + + + + Raises the event. + + The instance containing the event data. + + + + Returns a collection of the child tokens of this token, in document order. + + + An of containing the child tokens of this , in document order. + + + + + Returns a collection of the child values of this token, in document order. + + The type to convert the values to. + + A containing the child values of this , in document order. + + + + + Returns a collection of the descendant tokens for this token in document order. + + An containing the descendant tokens of the . + + + + Returns a collection of the tokens that contain this token, and all descendant tokens of this token, in document order. + + An containing this token, and all the descendant tokens of the . + + + + Adds the specified content as children of this . + + The content to be added. + + + + Adds the specified content as the first children of this . + + The content to be added. + + + + Creates an that can be used to add tokens to the . + + An that is ready to have content written to it. + + + + Replaces the children nodes of this token with the specified content. + + The content. + + + + Removes the child nodes from this token. + + + + + Merge the specified content into this . + + The content to be merged. + + + + Merge the specified content into this using . + + The content to be merged. + The used to merge the content. + + + + Occurs when the list changes or an item in the list changes. + + + + + Occurs before an item is added to the collection. + + + + + Occurs when the items list of the collection has changed, or the collection is reset. + + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets a value indicating whether this token has child tokens. + + + true if this token has child values; otherwise, false. + + + + + Get the first child token of this token. + + + A containing the first child token of the . + + + + + Get the last child token of this token. + + + A containing the last child token of the . + + + + + Gets the count of child JSON tokens. + + The count of child JSON tokens + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the specified name and content. + + The constructor name. + The contents of the constructor. + + + + Initializes a new instance of the class with the specified name and content. + + The constructor name. + The contents of the constructor. + + + + Initializes a new instance of the class with the specified name. + + The constructor name. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets or sets the name of this constructor. + + The constructor name. + + + + Gets the node type for this . + + The type. + + + + Gets the with the specified key. + + The with the specified key. + + + + Represents a collection of objects. + + The type of token + + + + An empty collection of objects. + + + + + Initializes a new instance of the struct. + + The enumerable. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Gets the with the specified key. + + + + + + Represents a JSON object. + + + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the specified content. + + The contents of the object. + + + + Initializes a new instance of the class with the specified content. + + The contents of the object. + + + + Gets an of this object's properties. + + An of this object's properties. + + + + Gets a the specified name. + + The property name. + A with the specified name or null. + + + + Gets an of this object's property values. + + An of this object's property values. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Load a from a string that contains JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + + + + Creates a from an object. + + The object that will be used to create . + A with the values of the specified object + + + + Creates a from an object. + + The object that will be used to create . + The that will be used to read the object. + A with the values of the specified object + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Gets the with the specified property name. + + Name of the property. + The with the specified property name. + + + + Gets the with the specified property name. + The exact property name will be searched for first and if no matching property is found then + the will be used to match a property. + + Name of the property. + One of the enumeration values that specifies how the strings will be compared. + The with the specified property name. + + + + Tries to get the with the specified property name. + The exact property name will be searched for first and if no matching property is found then + the will be used to match a property. + + Name of the property. + The value. + One of the enumeration values that specifies how the strings will be compared. + true if a value was successfully retrieved; otherwise, false. + + + + Adds the specified property name. + + Name of the property. + The value. + + + + Removes the property with the specified name. + + Name of the property. + true if item was successfully removed; otherwise, false. + + + + Tries the get value. + + Name of the property. + The value. + true if a value was successfully retrieved; otherwise, false. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Raises the event with the provided arguments. + + Name of the property. + + + + Raises the event with the provided arguments. + + Name of the property. + + + + Returns the properties for this instance of a component. + + + A that represents the properties for this component instance. + + + + + Returns the properties for this instance of a component using the attribute array as a filter. + + An array of type that is used as a filter. + + A that represents the filtered properties for this component instance. + + + + + Returns a collection of custom attributes for this instance of a component. + + + An containing the attributes for this object. + + + + + Returns the class name of this instance of a component. + + + The class name of the object, or null if the class does not have a name. + + + + + Returns the name of this instance of a component. + + + The name of the object, or null if the object does not have a name. + + + + + Returns a type converter for this instance of a component. + + + A that is the converter for this object, or null if there is no for this object. + + + + + Returns the default event for this instance of a component. + + + An that represents the default event for this object, or null if this object does not have events. + + + + + Returns the default property for this instance of a component. + + + A that represents the default property for this object, or null if this object does not have properties. + + + + + Returns an editor of the specified type for this instance of a component. + + A that represents the editor for this object. + + An of the specified type that is the editor for this object, or null if the editor cannot be found. + + + + + Returns the events for this instance of a component using the specified attribute array as a filter. + + An array of type that is used as a filter. + + An that represents the filtered events for this component instance. + + + + + Returns the events for this instance of a component. + + + An that represents the events for this component instance. + + + + + Returns an object that contains the property described by the specified property descriptor. + + A that represents the property whose owner is to be found. + + An that represents the owner of the specified property. + + + + + Returns the responsible for binding operations performed on this object. + + The expression tree representation of the runtime value. + + The to bind this object. + + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Occurs when a property value changes. + + + + + Occurs when a property value is changing. + + + + + Gets the node type for this . + + The type. + + + + Gets the with the specified key. + + The with the specified key. + + + + Gets or sets the with the specified property name. + + + + + + Represents a JSON array. + + + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the specified content. + + The contents of the array. + + + + Initializes a new instance of the class with the specified content. + + The contents of the array. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Load a from a string that contains JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + + + + Creates a from an object. + + The object that will be used to create . + A with the values of the specified object + + + + Creates a from an object. + + The object that will be used to create . + The that will be used to read the object. + A with the values of the specified object + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Inserts an item to the at the specified index. + + The zero-based index at which should be inserted. + The object to insert into the . + + is not a valid index in the . + The is read-only. + + + + Removes the item at the specified index. + + The zero-based index of the item to remove. + + is not a valid index in the . + The is read-only. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Adds an item to the . + + The object to add to the . + The is read-only. + + + + Removes all items from the . + + The is read-only. + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Copies to. + + The array. + Index of the array. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + The is read-only. + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets the node type for this . + + The type. + + + + Gets the with the specified key. + + The with the specified key. + + + + Gets or sets the at the specified index. + + + + + + Gets a value indicating whether the is read-only. + + true if the is read-only; otherwise, false. + + + + Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. + + + + + Initializes a new instance of the class. + + The token to read from. + + + + Reads the next JSON token from the stream as a []. + + + A [] or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Gets the at the reader's current position. + + + + + Gets the path of the current JSON token. + + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Initializes a new instance of the class writing to the given . + + The container being written to. + + + + Initializes a new instance of the class. + + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Closes this stream and the underlying stream. + + + + + Writes the beginning of a JSON object. + + + + + Writes the beginning of a JSON array. + + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes the end. + + The token. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes raw JSON. + + The raw JSON to write. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Gets the at the writer's current position. + + + + + Gets the token being writen. + + The token being writen. + + + + Represents a JSON property. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class. + + The property name. + The property content. + + + + Initializes a new instance of the class. + + The property name. + The property content. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets the property name. + + The property name. + + + + Gets or sets the property value. + + The property value. + + + + Gets the node type for this . + + The type. + + + + Specifies the type of token. + + + + + No token type has been set. + + + + + A JSON object. + + + + + A JSON array. + + + + + A JSON constructor. + + + + + A JSON object property. + + + + + A comment. + + + + + An integer value. + + + + + A float value. + + + + + A string value. + + + + + A boolean value. + + + + + A null value. + + + + + An undefined value. + + + + + A date value. + + + + + A raw JSON value. + + + + + A collection of bytes value. + + + + + A Guid value. + + + + + A Uri value. + + + + + A TimeSpan value. + + + + + + Contains the JSON schema extension methods. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + + Determines whether the is valid. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + + true if the specified is valid; otherwise, false. + + + + + + Determines whether the is valid. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + When this method returns, contains any error messages generated while validating. + + true if the specified is valid; otherwise, false. + + + + + + Validates the specified . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + + + + + Validates the specified . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + The validation event handler. + + + + + Returns detailed information about the schema exception. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Gets the line number indicating where the error occurred. + + The line number indicating where the error occurred. + + + + Gets the line position indicating where the error occurred. + + The line position indicating where the error occurred. + + + + Gets the path to the JSON where the error occurred. + + The path to the JSON where the error occurred. + + + + + Resolves from an id. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Initializes a new instance of the class. + + + + + Gets a for the specified reference. + + The id. + A for the specified reference. + + + + Gets or sets the loaded schemas. + + The loaded schemas. + + + + + Specifies undefined schema Id handling options for the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Do not infer a schema Id. + + + + + Use the .NET type name as the schema Id. + + + + + Use the assembly qualified .NET type name as the schema Id. + + + + + + Returns detailed information related to the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Gets the associated with the validation error. + + The JsonSchemaException associated with the validation error. + + + + Gets the path of the JSON location where the validation error occurred. + + The path of the JSON location where the validation error occurred. + + + + Gets the text description corresponding to the validation error. + + The text description. + + + + + Represents the callback method that will handle JSON schema validation events and the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Resolves member mappings for a type, camel casing property names. + + + + + Used by to resolves a for a given . + + + + + Used by to resolves a for a given . + + + + + + + + + Resolves the contract for a given type. + + The type to resolve a contract for. + The contract for a given type. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + If set to true the will use a cached shared with other resolvers of the same type. + Sharing the cache will significantly improve performance with multiple resolver instances because expensive reflection will only + happen once. This setting can cause unexpected behavior if different instances of the resolver are suppose to produce different + results. When set to false it is highly recommended to reuse instances with the . + + + + + Resolves the contract for a given type. + + The type to resolve a contract for. + The contract for a given type. + + + + Gets the serializable members for the type. + + The type to get serializable members for. + The serializable members for the type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates the constructor parameters. + + The constructor to create properties for. + The type's member properties. + Properties for the given . + + + + Creates a for the given . + + The matching member property. + The constructor parameter. + A created for the given . + + + + Resolves the default for the contract. + + Type of the object. + The contract's default . + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Determines which contract type is created for the given type. + + Type of the object. + A for the given type. + + + + Creates properties for the given . + + The type to create properties for. + /// The member serialization mode for the type. + Properties for the given . + + + + Creates the used by the serializer to get and set values from a member. + + The member. + The used by the serializer to get and set values from a member. + + + + Creates a for the given . + + The member's parent . + The member to create a for. + A created for the given . + + + + Resolves the name of the property. + + Name of the property. + Resolved name of the property. + + + + Resolves the key of the dictionary. By default is used to resolve dictionary keys. + + Key of the dictionary. + Resolved key of the dictionary. + + + + Gets the resolved name of the property. + + Name of the property. + Name of the property. + + + + Gets a value indicating whether members are being get and set using dynamic code generation. + This value is determined by the runtime permissions available. + + + true if using dynamic code generation; otherwise, false. + + + + + Gets or sets the default members search flags. + + The default members search flags. + + + + Gets or sets a value indicating whether compiler generated members should be serialized. + + + true if serialized compiler generated members; otherwise, false. + + + + + Gets or sets a value indicating whether to ignore the interface when serializing and deserializing types. + + + true if the interface will be ignored when serializing and deserializing types; otherwise, false. + + + + + Gets or sets a value indicating whether to ignore the attribute when serializing and deserializing types. + + + true if the attribute will be ignored when serializing and deserializing types; otherwise, false. + + + + + Initializes a new instance of the class. + + + + + Resolves the name of the property. + + Name of the property. + The property name camel cased. + + + + The default serialization binder used when resolving and loading classes from type names. + + + + + When overridden in a derived class, controls the binding of a serialized object to a type. + + Specifies the name of the serialized object. + Specifies the name of the serialized object. + + The type of the object the formatter creates a new instance of. + + + + + When overridden in a derived class, controls the binding of a serialized object to a type. + + The type of the object the formatter creates a new instance of. + Specifies the name of the serialized object. + Specifies the name of the serialized object. + + + + Provides information surrounding an error. + + + + + Gets the error. + + The error. + + + + Gets the original object that caused the error. + + The original object that caused the error. + + + + Gets the member that caused the error. + + The member that caused the error. + + + + Gets the path of the JSON location where the error occurred. + + The path of the JSON location where the error occurred. + + + + Gets or sets a value indicating whether this is handled. + + true if handled; otherwise, false. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets the of the collection items. + + The of the collection items. + + + + Gets a value indicating whether the collection type is a multidimensional array. + + true if the collection type is a multidimensional array; otherwise, false. + + + + Handles serialization callback events. + + The object that raised the callback event. + The streaming context. + + + + Handles serialization error callback events. + + The object that raised the callback event. + The streaming context. + The error context. + + + + Sets extension data for an object during deserialization. + + The object to set extension data on. + The extension data key. + The extension data value. + + + + Gets extension data for an object during serialization. + + The object to set extension data on. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets or sets the property name resolver. + + The property name resolver. + + + + Gets or sets the dictionary key resolver. + + The dictionary key resolver. + + + + Gets the of the dictionary keys. + + The of the dictionary keys. + + + + Gets the of the dictionary values. + + The of the dictionary values. + + + + Maps a JSON property to a .NET member or constructor parameter. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets or sets the name of the property. + + The name of the property. + + + + Gets or sets the type that declared this property. + + The type that declared this property. + + + + Gets or sets the order of serialization and deserialization of a member. + + The numeric order of serialization or deserialization. + + + + Gets or sets the name of the underlying member or parameter. + + The name of the underlying member or parameter. + + + + Gets the that will get and set the during serialization. + + The that will get and set the during serialization. + + + + Gets or sets the for this property. + + The for this property. + + + + Gets or sets the type of the property. + + The type of the property. + + + + Gets or sets the for the property. + If set this converter takes presidence over the contract converter for the property type. + + The converter. + + + + Gets or sets the member converter. + + The member converter. + + + + Gets or sets a value indicating whether this is ignored. + + true if ignored; otherwise, false. + + + + Gets or sets a value indicating whether this is readable. + + true if readable; otherwise, false. + + + + Gets or sets a value indicating whether this is writable. + + true if writable; otherwise, false. + + + + Gets or sets a value indicating whether this has a member attribute. + + true if has a member attribute; otherwise, false. + + + + Gets the default value. + + The default value. + + + + Gets or sets a value indicating whether this is required. + + A value indicating whether this is required. + + + + Gets or sets a value indicating whether this property preserves object references. + + + true if this instance is reference; otherwise, false. + + + + + Gets or sets the property null value handling. + + The null value handling. + + + + Gets or sets the property default value handling. + + The default value handling. + + + + Gets or sets the property reference loop handling. + + The reference loop handling. + + + + Gets or sets the property object creation handling. + + The object creation handling. + + + + Gets or sets or sets the type name handling. + + The type name handling. + + + + Gets or sets a predicate used to determine whether the property should be serialize. + + A predicate used to determine whether the property should be serialize. + + + + Gets or sets a predicate used to determine whether the property should be serialized. + + A predicate used to determine whether the property should be serialized. + + + + Gets or sets an action used to set whether the property has been deserialized. + + An action used to set whether the property has been deserialized. + + + + Gets or sets the converter used when serializing the property's collection items. + + The collection's items converter. + + + + Gets or sets whether this property's collection items are serialized as a reference. + + Whether this property's collection items are serialized as a reference. + + + + Gets or sets the the type name handling used when serializing the property's collection items. + + The collection's items type name handling. + + + + Gets or sets the the reference loop handling used when serializing the property's collection items. + + The collection's items reference loop handling. + + + + A collection of objects. + + + + + Initializes a new instance of the class. + + The type. + + + + When implemented in a derived class, extracts the key from the specified element. + + The element from which to extract the key. + The key for the specified element. + + + + Adds a object. + + The property to add to the collection. + + + + Gets the closest matching object. + First attempts to get an exact case match of propertyName and then + a case insensitive match. + + Name of the property. + A matching property if found. + + + + Gets a property by property name. + + The name of the property to get. + Type property name string comparison. + A matching property if found. + + + + Specifies missing member handling options for the . + + + + + Ignore a missing member and do not attempt to deserialize it. + + + + + Throw a when a missing member is encountered during deserialization. + + + + + Specifies null value handling options for the . + + + + + + + + + Include null values when serializing and deserializing objects. + + + + + Ignore null values when serializing and deserializing objects. + + + + + Specifies reference loop handling options for the . + + + + + Throw a when a loop is encountered. + + + + + Ignore loop references and do not serialize. + + + + + Serialize loop references. + + + + + + An in-memory representation of a JSON Schema. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Initializes a new instance of the class. + + + + + Reads a from the specified . + + The containing the JSON Schema to read. + The object representing the JSON Schema. + + + + Reads a from the specified . + + The containing the JSON Schema to read. + The to use when resolving schema references. + The object representing the JSON Schema. + + + + Load a from a string that contains schema JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + Parses the specified json. + + The json. + The resolver. + A populated from the string that contains JSON. + + + + Writes this schema to a . + + A into which this method will write. + + + + Writes this schema to a using the specified . + + A into which this method will write. + The resolver used. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets or sets the id. + + + + + Gets or sets the title. + + + + + Gets or sets whether the object is required. + + + + + Gets or sets whether the object is read only. + + + + + Gets or sets whether the object is visible to users. + + + + + Gets or sets whether the object is transient. + + + + + Gets or sets the description of the object. + + + + + Gets or sets the types of values allowed by the object. + + The type. + + + + Gets or sets the pattern. + + The pattern. + + + + Gets or sets the minimum length. + + The minimum length. + + + + Gets or sets the maximum length. + + The maximum length. + + + + Gets or sets a number that the value should be divisble by. + + A number that the value should be divisble by. + + + + Gets or sets the minimum. + + The minimum. + + + + Gets or sets the maximum. + + The maximum. + + + + Gets or sets a flag indicating whether the value can not equal the number defined by the "minimum" attribute. + + A flag indicating whether the value can not equal the number defined by the "minimum" attribute. + + + + Gets or sets a flag indicating whether the value can not equal the number defined by the "maximum" attribute. + + A flag indicating whether the value can not equal the number defined by the "maximum" attribute. + + + + Gets or sets the minimum number of items. + + The minimum number of items. + + + + Gets or sets the maximum number of items. + + The maximum number of items. + + + + Gets or sets the of items. + + The of items. + + + + Gets or sets a value indicating whether items in an array are validated using the instance at their array position from . + + + true if items are validated using their array position; otherwise, false. + + + + + Gets or sets the of additional items. + + The of additional items. + + + + Gets or sets a value indicating whether additional items are allowed. + + + true if additional items are allowed; otherwise, false. + + + + + Gets or sets whether the array items must be unique. + + + + + Gets or sets the of properties. + + The of properties. + + + + Gets or sets the of additional properties. + + The of additional properties. + + + + Gets or sets the pattern properties. + + The pattern properties. + + + + Gets or sets a value indicating whether additional properties are allowed. + + + true if additional properties are allowed; otherwise, false. + + + + + Gets or sets the required property if this property is present. + + The required property if this property is present. + + + + Gets or sets the a collection of valid enum values allowed. + + A collection of valid enum values allowed. + + + + Gets or sets disallowed types. + + The disallow types. + + + + Gets or sets the default value. + + The default value. + + + + Gets or sets the collection of that this schema extends. + + The collection of that this schema extends. + + + + Gets or sets the format. + + The format. + + + + + Generates a from a specified . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Generate a from the specified type. + + The type to generate a from. + A generated from the specified type. + + + + Generate a from the specified type. + + The type to generate a from. + The used to resolve schema references. + A generated from the specified type. + + + + Generate a from the specified type. + + The type to generate a from. + Specify whether the generated root will be nullable. + A generated from the specified type. + + + + Generate a from the specified type. + + The type to generate a from. + The used to resolve schema references. + Specify whether the generated root will be nullable. + A generated from the specified type. + + + + Gets or sets how undefined schemas are handled by the serializer. + + + + + Gets or sets the contract resolver. + + The contract resolver. + + + + + The value types allowed by the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + No type specified. + + + + + String type. + + + + + Float type. + + + + + Integer type. + + + + + Boolean type. + + + + + Object type. + + + + + Array type. + + + + + Null type. + + + + + Any type. + + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets or sets the object member serialization. + + The member object serialization. + + + + Gets or sets a value that indicates whether the object's properties are required. + + + A value indicating whether the object's properties are required. + + + + + Gets the object's properties. + + The object's properties. + + + + Gets the constructor parameters required for any non-default constructor + + + + + Gets a collection of instances that define the parameters used with . + + + + + Gets or sets the override constructor used to create the object. + This is set when a constructor is marked up using the + JsonConstructor attribute. + + The override constructor. + + + + Gets or sets the parametrized constructor used to create the object. + + The parametrized constructor. + + + + Gets or sets the function used to create the object. When set this function will override . + This function is called with a collection of arguments which are defined by the collection. + + The function used to create the object. + + + + Gets or sets the extension data setter. + + + + + Gets or sets the extension data getter. + + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Lookup and create an instance of the JsonConverter type described by the argument. + + The JsonConverter type to create. + Optional arguments to pass to an initializing constructor of the JsonConverter. + If null, the default constructor is used. + + + + Create a factory function that can be used to create instances of a JsonConverter described by the + argument type. The returned function can then be used to either invoke the converter's default ctor, or any + parameterized constructors by way of an object array. + + + + + Get and set values for a using reflection. + + + + + Initializes a new instance of the class. + + The member info. + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + When applied to a method, specifies that the method is called when an error occurs serializing an object. + + + + + Helper method for generating a MetaObject which calls a + specific method on Dynamic that returns a result + + + + + Helper method for generating a MetaObject which calls a + specific method on Dynamic, but uses one of the arguments for + the result. + + + + + Helper method for generating a MetaObject which calls a + specific method on Dynamic, but uses one of the arguments for + the result. + + + + + Returns a Restrictions object which includes our current restrictions merged + with a restriction limiting our type + + + + + Represents a method that constructs an object. + + The object type to create. + + + + Specifies type name handling options for the . + + + + + Do not include the .NET type name when serializing types. + + + + + Include the .NET type name when serializing into a JSON object structure. + + + + + Include the .NET type name when serializing into a JSON array structure. + + + + + Always include the .NET type name when serializing. + + + + + Include the .NET type name when the type of the object being serialized is not the same as its declared type. + + + + + Converts the value to the specified type. If the value is unable to be converted, the + value is checked whether it assignable to the specified type. + + The value to convert. + The culture to use when converting. + The type to convert or cast the value to. + + The converted type. If conversion was unsuccessful, the initial value + is returned if assignable to the target type. + + + + + Gets a dictionary of the names and values of an Enum type. + + + + + + Gets a dictionary of the names and values of an Enum type. + + The enum type to get names and values for. + + + + + Specifies the type of JSON token. + + + + + This is returned by the if a method has not been called. + + + + + An object start token. + + + + + An array start token. + + + + + A constructor start token. + + + + + An object property name. + + + + + A comment. + + + + + Raw JSON. + + + + + An integer. + + + + + A float. + + + + + A string. + + + + + A boolean. + + + + + A null token. + + + + + An undefined token. + + + + + An object end token. + + + + + An array end token. + + + + + A constructor end token. + + + + + A Date. + + + + + Byte data. + + + + + Builds a string. Unlike StringBuilder this class lets you reuse it's internal buffer. + + + + + Determines whether the collection is null or empty. + + The collection. + + true if the collection is null or empty; otherwise, false. + + + + + Adds the elements of the specified collection to the specified generic IList. + + The list to add to. + The collection of elements to add. + + + + Returns the index of the first occurrence in a sequence by using a specified IEqualityComparer{TSource}. + + The type of the elements of source. + A sequence in which to locate a value. + The object to locate in the sequence + An equality comparer to compare values. + The zero-based index of the first occurrence of value within the entire sequence, if found; otherwise, –1. + + + + Gets the type of the typed collection's items. + + The type. + The type of the typed collection's items. + + + + Gets the member's underlying type. + + The member. + The underlying type of the member. + + + + Determines whether the member is an indexed property. + + The member. + + true if the member is an indexed property; otherwise, false. + + + + + Determines whether the property is an indexed property. + + The property. + + true if the property is an indexed property; otherwise, false. + + + + + Gets the member's value on the object. + + The member. + The target object. + The member's value on the object. + + + + Sets the member's value on the target object. + + The member. + The target. + The value. + + + + Determines whether the specified MemberInfo can be read. + + The MemberInfo to determine whether can be read. + /// if set to true then allow the member to be gotten non-publicly. + + true if the specified MemberInfo can be read; otherwise, false. + + + + + Determines whether the specified MemberInfo can be set. + + The MemberInfo to determine whether can be set. + if set to true then allow the member to be set non-publicly. + if set to true then allow the member to be set if read-only. + + true if the specified MemberInfo can be set; otherwise, false. + + + + + Determines whether the string is all white space. Empty string will return false. + + The string to test whether it is all white space. + + true if the string is all white space; otherwise, false. + + + + + Nulls an empty string. + + The string. + Null if the string was null, otherwise the string unchanged. + + + + Specifies the state of the . + + + + + An exception has been thrown, which has left the in an invalid state. + You may call the method to put the in the Closed state. + Any other method calls results in an being thrown. + + + + + The method has been called. + + + + + An object is being written. + + + + + A array is being written. + + + + + A constructor is being written. + + + + + A property is being written. + + + + + A write method has not been called. + + + + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net45/Newtonsoft.Json.dll b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net45/Newtonsoft.Json.dll new file mode 100644 index 00000000..d4c90377 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net45/Newtonsoft.Json.dll differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net45/Newtonsoft.Json.pdb b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net45/Newtonsoft.Json.pdb new file mode 100644 index 00000000..9b0838d4 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net45/Newtonsoft.Json.pdb differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net45/Newtonsoft.Json.xml b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net45/Newtonsoft.Json.xml new file mode 100644 index 00000000..246ae3b9 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Net45/Newtonsoft.Json.xml @@ -0,0 +1,8889 @@ + + + + Newtonsoft.Json + + + + + Represents a BSON Oid (object id). + + + + + Initializes a new instance of the class. + + The Oid value. + + + + Gets or sets the value of the Oid. + + The value of the Oid. + + + + Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. + + + + + Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. + + + + + Initializes a new instance of the class with the specified . + + + + + Reads the next JSON token from the stream. + + true if the next token was read successfully; false if there are no more tokens to read. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a []. + + A [] or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Skips the children of the current token. + + + + + Sets the current token. + + The new token. + + + + Sets the current token and value. + + The new token. + The value. + + + + Sets the state based on current token type. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Releases unmanaged and - optionally - managed resources + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Changes the to Closed. + + + + + Gets the current reader state. + + The current reader state. + + + + Gets or sets a value indicating whether the underlying stream or + should be closed when the reader is closed. + + + true to close the underlying stream or when + the reader is closed; otherwise false. The default is true. + + + + + Gets or sets a value indicating whether multiple pieces of JSON content can + be read from a continuous stream without erroring. + + + true to support reading multiple pieces of JSON content; otherwise false. The default is false. + + + + + Gets the quotation mark character used to enclose the value of a string. + + + + + Get or set how time zones are handling when reading JSON. + + + + + Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. + + + + + Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Get or set how custom date formatted strings are parsed when reading JSON. + + + + + Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + + + + + Gets the type of the current JSON token. + + + + + Gets the text value of the current JSON token. + + + + + Gets The Common Language Runtime (CLR) type for the current JSON token. + + + + + Gets the depth of the current token in the JSON document. + + The depth of the current token in the JSON document. + + + + Gets the path of the current JSON token. + + + + + Gets or sets the culture used when reading JSON. Defaults to . + + + + + Specifies the state of the reader. + + + + + The Read method has not been called. + + + + + The end of the file has been reached successfully. + + + + + Reader is at a property. + + + + + Reader is at the start of an object. + + + + + Reader is in an object. + + + + + Reader is at the start of an array. + + + + + Reader is in an array. + + + + + The Close method has been called. + + + + + Reader has just read a value. + + + + + Reader is at the start of a constructor. + + + + + Reader in a constructor. + + + + + An error occurred that prevents the read operation from continuing. + + + + + The end of the file has been reached successfully. + + + + + Initializes a new instance of the class. + + The stream. + + + + Initializes a new instance of the class. + + The reader. + + + + Initializes a new instance of the class. + + The stream. + if set to true the root object will be read as a JSON array. + The used when reading values from BSON. + + + + Initializes a new instance of the class. + + The reader. + if set to true the root object will be read as a JSON array. + The used when reading values from BSON. + + + + Reads the next JSON token from the stream as a []. + + + A [] or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + + A . This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Changes the to Closed. + + + + + Gets or sets a value indicating whether binary data reading should compatible with incorrect Json.NET 3.5 written binary. + + + true if binary data reading will be compatible with incorrect Json.NET 3.5 written binary; otherwise, false. + + + + + Gets or sets a value indicating whether the root object will be read as a JSON array. + + + true if the root object will be read as a JSON array; otherwise, false. + + + + + Gets or sets the used when reading values from BSON. + + The used when reading values from BSON. + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Creates an instance of the JsonWriter class. + + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Closes this stream and the underlying stream. + + + + + Writes the beginning of a JSON object. + + + + + Writes the end of a JSON object. + + + + + Writes the beginning of a JSON array. + + + + + Writes the end of an array. + + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes the end constructor. + + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + A flag to indicate whether the text should be escaped when it is written as a JSON property name. + + + + Writes the end of the current JSON object or array. + + + + + Writes the current token and its children. + + The to read the token from. + + + + Writes the current token. + + The to read the token from. + A flag indicating whether the current token's children should be written. + + + + Writes the token and its value. + + The to write. + + The value to write. + A value is only required for tokens that have an associated value, e.g. the property name for . + A null value can be passed to the method for token's that don't have a value, e.g. . + + + + Writes the token. + + The to write. + + + + Writes the specified end token. + + The end token to write. + + + + Writes indent characters. + + + + + Writes the JSON value delimiter. + + + + + Writes an indent space. + + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes raw JSON without changing the writer's state. + + The raw JSON to write. + + + + Writes raw JSON where a value is expected and updates the writer's state. + + The raw JSON to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes out the given white space. + + The string of white space characters. + + + + Sets the state of the JsonWriter, + + The JsonToken being written. + The value being written. + + + + Gets or sets a value indicating whether the underlying stream or + should be closed when the writer is closed. + + + true to close the underlying stream or when + the writer is closed; otherwise false. The default is true. + + + + + Gets the top. + + The top. + + + + Gets the state of the writer. + + + + + Gets the path of the writer. + + + + + Indicates how JSON text output is formatted. + + + + + Get or set how dates are written to JSON text. + + + + + Get or set how time zones are handling when writing JSON text. + + + + + Get or set how strings are escaped when writing JSON text. + + + + + Get or set how special floating point numbers, e.g. , + and , + are written to JSON text. + + + + + Get or set how and values are formatting when writing JSON text. + + + + + Gets or sets the culture used when writing JSON. Defaults to . + + + + + Initializes a new instance of the class. + + The stream. + + + + Initializes a new instance of the class. + + The writer. + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Writes the end. + + The token. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes raw JSON. + + The raw JSON to write. + + + + Writes raw JSON where a value is expected and updates the writer's state. + + The raw JSON to write. + + + + Writes the beginning of a JSON array. + + + + + Writes the beginning of a JSON object. + + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Closes this stream and the underlying stream. + + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value that represents a BSON object id. + + The Object ID value to write. + + + + Writes a BSON regex. + + The regex pattern. + The regex options. + + + + Gets or sets the used when writing values to BSON. + When set to no conversion will occur. + + The used when writing values to BSON. + + + + Specifies how constructors are used when initializing objects during deserialization by the . + + + + + First attempt to use the public default constructor, then fall back to single paramatized constructor, then the non-public default constructor. + + + + + Json.NET will use a non-public default constructor before falling back to a paramatized constructor. + + + + + Converts a binary value to and from a base 64 string value. + + + + + Converts an object to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + + Gets the of the JSON produced by the JsonConverter. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The of the JSON produced by the JsonConverter. + + + + Gets a value indicating whether this can read JSON. + + true if this can read JSON; otherwise, false. + + + + Gets a value indicating whether this can write JSON. + + true if this can write JSON; otherwise, false. + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts a to and from JSON and BSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Create a custom object + + The object type to convert. + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Creates an object which will then be populated by the serializer. + + Type of the object. + The created object. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Gets a value indicating whether this can write JSON. + + + true if this can write JSON; otherwise, false. + + + + + Converts a to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified value type. + + Type of the value. + + true if this instance can convert the specified value type; otherwise, false. + + + + + Converts a to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified value type. + + Type of the value. + + true if this instance can convert the specified value type; otherwise, false. + + + + + Provides a base class for converting a to and from JSON. + + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts a F# discriminated union type to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts an Entity Framework EntityKey to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts an ExpandoObject to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Gets a value indicating whether this can write JSON. + + + true if this can write JSON; otherwise, false. + + + + + Converts a to and from the ISO 8601 date format (e.g. 2008-04-12T12:53Z). + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Gets or sets the date time styles used when converting a date to and from JSON. + + The date time styles used when converting a date to and from JSON. + + + + Gets or sets the date time format used when converting a date to and from JSON. + + The date time format used when converting a date to and from JSON. + + + + Gets or sets the culture used when converting a date to and from JSON. + + The culture used when converting a date to and from JSON. + + + + Converts a to and from a JavaScript date constructor (e.g. new Date(52231943)). + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing property value of the JSON that is being converted. + The calling serializer. + The object value. + + + + Converts a to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts a to and from JSON and BSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts an to and from its name string value. + + + + + Initializes a new instance of the class. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Gets or sets a value indicating whether the written enum text should be camel case. + + true if the written enum text will be camel case; otherwise, false. + + + + Gets or sets a value indicating whether integer values are allowed. + + true if integers are allowed; otherwise, false. + + + + Converts a to and from a string (e.g. "1.2.3.4"). + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing property value of the JSON that is being converted. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts XML to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The calling serializer. + The value. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Checks if the attributeName is a namespace attribute. + + Attribute name to test. + The attribute name prefix if it has one, otherwise an empty string. + True if attribute name is for a namespace attribute, otherwise false. + + + + Determines whether this instance can convert the specified value type. + + Type of the value. + + true if this instance can convert the specified value type; otherwise, false. + + + + + Gets or sets the name of the root element to insert when deserializing to XML if the JSON structure has produces multiple root elements. + + The name of the deserialize root element. + + + + Gets or sets a flag to indicate whether to write the Json.NET array attribute. + This attribute helps preserve arrays when converting the written XML back to JSON. + + true if the array attibute is written to the XML; otherwise, false. + + + + Gets or sets a value indicating whether to write the root JSON object. + + true if the JSON root object is omitted; otherwise, false. + + + + Specifies how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Floating point numbers are parsed to . + + + + + Floating point numbers are parsed to . + + + + + Specifies how dates are formatted when writing JSON text. + + + + + Dates are written in the ISO 8601 format, e.g. "2012-03-21T05:40Z". + + + + + Dates are written in the Microsoft JSON format, e.g. "\/Date(1198908717056)\/". + + + + + Specifies how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON text. + + + + + Date formatted strings are not parsed to a date type and are read as strings. + + + + + Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . + + + + + Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . + + + + + Specifies how to treat the time value when converting between string and . + + + + + Treat as local time. If the object represents a Coordinated Universal Time (UTC), it is converted to the local time. + + + + + Treat as a UTC. If the object represents a local time, it is converted to a UTC. + + + + + Treat as a local time if a is being converted to a string. + If a string is being converted to , convert to a local time if a time zone is specified. + + + + + Time zone information should be preserved when converting. + + + + + Specifies default value handling options for the . + + + + + + + + + Include members where the member value is the same as the member's default value when serializing objects. + Included members are written to JSON. Has no effect when deserializing. + + + + + Ignore members where the member value is the same as the member's default value when serializing objects + so that is is not written to JSON. + This option will ignore all default values (e.g. null for objects and nullable types; 0 for integers, + decimals and floating point numbers; and false for booleans). The default value ignored can be changed by + placing the on the property. + + + + + Members with a default value but no JSON will be set to their default value when deserializing. + + + + + Ignore members where the member value is the same as the member's default value when serializing objects + and sets members to their default value when deserializing. + + + + + Specifies float format handling options when writing special floating point numbers, e.g. , + and with . + + + + + Write special floating point values as strings in JSON, e.g. "NaN", "Infinity", "-Infinity". + + + + + Write special floating point values as symbols in JSON, e.g. NaN, Infinity, -Infinity. + Note that this will produce non-valid JSON. + + + + + Write special floating point values as the property's default value in JSON, e.g. 0.0 for a property, null for a property. + + + + + Specifies formatting options for the . + + + + + No special formatting is applied. This is the default. + + + + + Causes child objects to be indented according to the and settings. + + + + + Provides an interface to enable a class to return line and position information. + + + + + Gets a value indicating whether the class can return line information. + + + true if LineNumber and LinePosition can be provided; otherwise, false. + + + + + Gets the current line number. + + The current line number or 0 if no line information is available (for example, HasLineInfo returns false). + + + + Gets the current line position. + + The current line position or 0 if no line information is available (for example, HasLineInfo returns false). + + + + Instructs the how to serialize the collection. + + + + + Instructs the how to serialize the object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + Gets or sets the id. + + The id. + + + + Gets or sets the title. + + The title. + + + + Gets or sets the description. + + The description. + + + + Gets the collection's items converter. + + The collection's items converter. + + + + The parameter list to use when constructing the JsonConverter described by ItemConverterType. + If null, the default constructor is used. + When non-null, there must be a constructor defined in the JsonConverter that exactly matches the number, + order, and type of these parameters. + + + [JsonContainer(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })] + + + + + Gets or sets a value that indicates whether to preserve object references. + + + true to keep object reference; otherwise, false. The default is false. + + + + + Gets or sets a value that indicates whether to preserve collection's items references. + + + true to keep collection's items object references; otherwise, false. The default is false. + + + + + Gets or sets the reference loop handling used when serializing the collection's items. + + The reference loop handling. + + + + Gets or sets the type name handling used when serializing the collection's items. + + The type name handling. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with a flag indicating whether the array can contain null items + + A flag indicating whether the array can contain null items. + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + Gets or sets a value indicating whether null items are allowed in the collection. + + true if null items are allowed in the collection; otherwise, false. + + + + Instructs the to use the specified constructor when deserializing that object. + + + + + Provides methods for converting between common language runtime types and JSON types. + + + + + + + + Represents JavaScript's boolean value true as a string. This field is read-only. + + + + + Represents JavaScript's boolean value false as a string. This field is read-only. + + + + + Represents JavaScript's null as a string. This field is read-only. + + + + + Represents JavaScript's undefined as a string. This field is read-only. + + + + + Represents JavaScript's positive infinity as a string. This field is read-only. + + + + + Represents JavaScript's negative infinity as a string. This field is read-only. + + + + + Represents JavaScript's NaN as a string. This field is read-only. + + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation using the specified. + + The value to convert. + The format the date will be converted to. + The time zone handling when the date is converted to a string. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation using the specified. + + The value to convert. + The format the date will be converted to. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + The string delimiter character. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + The string delimiter character. + The string escape handling. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Serializes the specified object to a JSON string. + + The object to serialize. + A JSON string representation of the object. + + + + Serializes the specified object to a JSON string using formatting. + + The object to serialize. + Indicates how the output is formatted. + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using a collection of . + + The object to serialize. + A collection converters used while serializing. + A JSON string representation of the object. + + + + Serializes the specified object to a JSON string using formatting and a collection of . + + The object to serialize. + Indicates how the output is formatted. + A collection converters used while serializing. + A JSON string representation of the object. + + + + Serializes the specified object to a JSON string using . + + The object to serialize. + The used to serialize the object. + If this is null, default serialization settings will be used. + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using a type, formatting and . + + The object to serialize. + The used to serialize the object. + If this is null, default serialization settings will be used. + + The type of the value being serialized. + This parameter is used when is Auto to write out the type name if the type of the value does not match. + Specifing the type is optional. + + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using formatting and . + + The object to serialize. + Indicates how the output is formatted. + The used to serialize the object. + If this is null, default serialization settings will be used. + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using a type, formatting and . + + The object to serialize. + Indicates how the output is formatted. + The used to serialize the object. + If this is null, default serialization settings will be used. + + The type of the value being serialized. + This parameter is used when is Auto to write out the type name if the type of the value does not match. + Specifing the type is optional. + + + A JSON string representation of the object. + + + + + Asynchronously serializes the specified object to a JSON string. + Serialization will happen on a new thread. + + The object to serialize. + + A task that represents the asynchronous serialize operation. The value of the TResult parameter contains a JSON string representation of the object. + + + + + Asynchronously serializes the specified object to a JSON string using formatting. + Serialization will happen on a new thread. + + The object to serialize. + Indicates how the output is formatted. + + A task that represents the asynchronous serialize operation. The value of the TResult parameter contains a JSON string representation of the object. + + + + + Asynchronously serializes the specified object to a JSON string using formatting and a collection of . + Serialization will happen on a new thread. + + The object to serialize. + Indicates how the output is formatted. + The used to serialize the object. + If this is null, default serialization settings will be used. + + A task that represents the asynchronous serialize operation. The value of the TResult parameter contains a JSON string representation of the object. + + + + + Deserializes the JSON to a .NET object. + + The JSON to deserialize. + The deserialized object from the JSON string. + + + + Deserializes the JSON to a .NET object using . + + The JSON to deserialize. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type. + + The JSON to deserialize. + The of object being deserialized. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type. + + The type of the object to deserialize to. + The JSON to deserialize. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the given anonymous type. + + + The anonymous type to deserialize to. This can't be specified + traditionally and must be infered from the anonymous type passed + as a parameter. + + The JSON to deserialize. + The anonymous type object. + The deserialized anonymous type from the JSON string. + + + + Deserializes the JSON to the given anonymous type using . + + + The anonymous type to deserialize to. This can't be specified + traditionally and must be infered from the anonymous type passed + as a parameter. + + The JSON to deserialize. + The anonymous type object. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized anonymous type from the JSON string. + + + + Deserializes the JSON to the specified .NET type using a collection of . + + The type of the object to deserialize to. + The JSON to deserialize. + Converters to use while deserializing. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type using . + + The type of the object to deserialize to. + The object to deserialize. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type using a collection of . + + The JSON to deserialize. + The type of the object to deserialize. + Converters to use while deserializing. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type using . + + The JSON to deserialize. + The type of the object to deserialize to. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized object from the JSON string. + + + + Asynchronously deserializes the JSON to the specified .NET type. + Deserialization will happen on a new thread. + + The type of the object to deserialize to. + The JSON to deserialize. + + A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. + + + + + Asynchronously deserializes the JSON to the specified .NET type using . + Deserialization will happen on a new thread. + + The type of the object to deserialize to. + The JSON to deserialize. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + + A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. + + + + + Asynchronously deserializes the JSON to the specified .NET type. + Deserialization will happen on a new thread. + + The JSON to deserialize. + + A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. + + + + + Asynchronously deserializes the JSON to the specified .NET type using . + Deserialization will happen on a new thread. + + The JSON to deserialize. + The type of the object to deserialize to. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + + A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. + + + + + Populates the object with values from the JSON string. + + The JSON to populate values from. + The target object to populate values onto. + + + + Populates the object with values from the JSON string using . + + The JSON to populate values from. + The target object to populate values onto. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + + + + Asynchronously populates the object with values from the JSON string using . + + The JSON to populate values from. + The target object to populate values onto. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + + A task that represents the asynchronous populate operation. + + + + + Serializes the XML node to a JSON string. + + The node to serialize. + A JSON string of the XmlNode. + + + + Serializes the XML node to a JSON string using formatting. + + The node to serialize. + Indicates how the output is formatted. + A JSON string of the XmlNode. + + + + Serializes the XML node to a JSON string using formatting and omits the root object if is true. + + The node to serialize. + Indicates how the output is formatted. + Omits writing the root object. + A JSON string of the XmlNode. + + + + Deserializes the XmlNode from a JSON string. + + The JSON string. + The deserialized XmlNode + + + + Deserializes the XmlNode from a JSON string nested in a root elment specified by . + + The JSON string. + The name of the root element to append when deserializing. + The deserialized XmlNode + + + + Deserializes the XmlNode from a JSON string nested in a root elment specified by + and writes a .NET array attribute for collections. + + The JSON string. + The name of the root element to append when deserializing. + + A flag to indicate whether to write the Json.NET array attribute. + This attribute helps preserve arrays when converting the written XML back to JSON. + + The deserialized XmlNode + + + + Serializes the to a JSON string. + + The node to convert to JSON. + A JSON string of the XNode. + + + + Serializes the to a JSON string using formatting. + + The node to convert to JSON. + Indicates how the output is formatted. + A JSON string of the XNode. + + + + Serializes the to a JSON string using formatting and omits the root object if is true. + + The node to serialize. + Indicates how the output is formatted. + Omits writing the root object. + A JSON string of the XNode. + + + + Deserializes the from a JSON string. + + The JSON string. + The deserialized XNode + + + + Deserializes the from a JSON string nested in a root elment specified by . + + The JSON string. + The name of the root element to append when deserializing. + The deserialized XNode + + + + Deserializes the from a JSON string nested in a root elment specified by + and writes a .NET array attribute for collections. + + The JSON string. + The name of the root element to append when deserializing. + + A flag to indicate whether to write the Json.NET array attribute. + This attribute helps preserve arrays when converting the written XML back to JSON. + + The deserialized XNode + + + + Gets or sets a function that creates default . + Default settings are automatically used by serialization methods on , + and and on . + To serialize without using any default settings create a with + . + + + + + Instructs the to use the specified when serializing the member or class. + + + + + Initializes a new instance of the class. + + Type of the converter. + + + + Initializes a new instance of the class. + + Type of the converter. + Parameter list to use when constructing the JsonConverter. Can be null. + + + + Gets the of the converter. + + The of the converter. + + + + The parameter list to use when constructing the JsonConverter described by ConverterType. + If null, the default constructor is used. + + + + + Represents a collection of . + + + + + Instructs the how to serialize the collection. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + The exception thrown when an error occurs during JSON serialization or deserialization. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Instructs the to deserialize properties with no matching class member into the specified collection + and write values during serialization. + + + + + Initializes a new instance of the class. + + + + + Gets or sets a value that indicates whether to write extension data when serializing the object. + + + true to write extension data when serializing the object; otherwise, false. The default is true. + + + + + Gets or sets a value that indicates whether to read extension data when deserializing the object. + + + true to read extension data when deserializing the object; otherwise, false. The default is true. + + + + + Instructs the not to serialize the public field or public read/write property value. + + + + + Instructs the how to serialize the object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified member serialization. + + The member serialization. + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + Gets or sets the member serialization. + + The member serialization. + + + + Gets or sets a value that indicates whether the object's properties are required. + + + A value indicating whether the object's properties are required. + + + + + Instructs the to always serialize the member with the specified name. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified name. + + Name of the property. + + + + Gets or sets the converter used when serializing the property's collection items. + + The collection's items converter. + + + + The parameter list to use when constructing the JsonConverter described by ItemConverterType. + If null, the default constructor is used. + When non-null, there must be a constructor defined in the JsonConverter that exactly matches the number, + order, and type of these parameters. + + + [JsonProperty(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })] + + + + + Gets or sets the null value handling used when serializing this property. + + The null value handling. + + + + Gets or sets the default value handling used when serializing this property. + + The default value handling. + + + + Gets or sets the reference loop handling used when serializing this property. + + The reference loop handling. + + + + Gets or sets the object creation handling used when deserializing this property. + + The object creation handling. + + + + Gets or sets the type name handling used when serializing this property. + + The type name handling. + + + + Gets or sets whether this property's value is serialized as a reference. + + Whether this property's value is serialized as a reference. + + + + Gets or sets the order of serialization and deserialization of a member. + + The numeric order of serialization or deserialization. + + + + Gets or sets a value indicating whether this property is required. + + + A value indicating whether this property is required. + + + + + Gets or sets the name of the property. + + The name of the property. + + + + Gets or sets the the reference loop handling used when serializing the property's collection items. + + The collection's items reference loop handling. + + + + Gets or sets the the type name handling used when serializing the property's collection items. + + The collection's items type name handling. + + + + Gets or sets whether this property's collection items are serialized as a reference. + + Whether this property's collection items are serialized as a reference. + + + + The exception thrown when an error occurs while reading JSON text. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Gets the line number indicating where the error occurred. + + The line number indicating where the error occurred. + + + + Gets the line position indicating where the error occurred. + + The line position indicating where the error occurred. + + + + Gets the path to the JSON where the error occurred. + + The path to the JSON where the error occurred. + + + + Instructs the to always serialize the member, and require the member has a value. + + + + + The exception thrown when an error occurs during JSON serialization or deserialization. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Serializes and deserializes objects into and from the JSON format. + The enables you to control how objects are encoded into JSON. + + + + + Initializes a new instance of the class. + + + + + Creates a new instance. + The will not use default settings. + + + A new instance. + The will not use default settings. + + + + + Creates a new instance using the specified . + The will not use default settings. + + The settings to be applied to the . + + A new instance using the specified . + The will not use default settings. + + + + + Creates a new instance. + The will use default settings. + + + A new instance. + The will use default settings. + + + + + Creates a new instance using the specified . + The will use default settings. + + The settings to be applied to the . + + A new instance using the specified . + The will use default settings. + + + + + Populates the JSON values onto the target object. + + The that contains the JSON structure to reader values from. + The target object to populate values onto. + + + + Populates the JSON values onto the target object. + + The that contains the JSON structure to reader values from. + The target object to populate values onto. + + + + Deserializes the JSON structure contained by the specified . + + The that contains the JSON structure to deserialize. + The being deserialized. + + + + Deserializes the JSON structure contained by the specified + into an instance of the specified type. + + The containing the object. + The of object being deserialized. + The instance of being deserialized. + + + + Deserializes the JSON structure contained by the specified + into an instance of the specified type. + + The containing the object. + The type of the object to deserialize. + The instance of being deserialized. + + + + Deserializes the JSON structure contained by the specified + into an instance of the specified type. + + The containing the object. + The of object being deserialized. + The instance of being deserialized. + + + + Serializes the specified and writes the JSON structure + to a Stream using the specified . + + The used to write the JSON structure. + The to serialize. + + + + Serializes the specified and writes the JSON structure + to a Stream using the specified . + + The used to write the JSON structure. + The to serialize. + + The type of the value being serialized. + This parameter is used when is Auto to write out the type name if the type of the value does not match. + Specifing the type is optional. + + + + + Serializes the specified and writes the JSON structure + to a Stream using the specified . + + The used to write the JSON structure. + The to serialize. + + The type of the value being serialized. + This parameter is used when is Auto to write out the type name if the type of the value does not match. + Specifing the type is optional. + + + + + Serializes the specified and writes the JSON structure + to a Stream using the specified . + + The used to write the JSON structure. + The to serialize. + + + + Occurs when the errors during serialization and deserialization. + + + + + Gets or sets the used by the serializer when resolving references. + + + + + Gets or sets the used by the serializer when resolving type names. + + + + + Gets or sets the used by the serializer when writing trace messages. + + The trace writer. + + + + Gets or sets the equality comparer used by the serializer when comparing references. + + The equality comparer. + + + + Gets or sets how type name writing and reading is handled by the serializer. + + + + + Gets or sets how a type name assembly is written and resolved by the serializer. + + The type name assembly format. + + + + Gets or sets how object references are preserved by the serializer. + + + + + Get or set how reference loops (e.g. a class referencing itself) is handled. + + + + + Get or set how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. + + + + + Get or set how null values are handled during serialization and deserialization. + + + + + Get or set how null default are handled during serialization and deserialization. + + + + + Gets or sets how objects are created during deserialization. + + The object creation handling. + + + + Gets or sets how constructors are used during deserialization. + + The constructor handling. + + + + Gets or sets how metadata properties are used during deserialization. + + The metadata properties handling. + + + + Gets a collection that will be used during serialization. + + Collection that will be used during serialization. + + + + Gets or sets the contract resolver used by the serializer when + serializing .NET objects to JSON and vice versa. + + + + + Gets or sets the used by the serializer when invoking serialization callback methods. + + The context. + + + + Indicates how JSON text output is formatted. + + + + + Get or set how dates are written to JSON text. + + + + + Get or set how time zones are handling during serialization and deserialization. + + + + + Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. + + + + + Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Get or set how special floating point numbers, e.g. , + and , + are written as JSON text. + + + + + Get or set how strings are escaped when writing JSON text. + + + + + Get or set how and values are formatted when writing JSON text, and the expected date format when reading JSON text. + + + + + Gets or sets the culture used when reading JSON. Defaults to . + + + + + Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + + + + + Gets a value indicating whether there will be a check for additional JSON content after deserializing an object. + + + true if there will be a check for additional JSON content after deserializing an object; otherwise, false. + + + + + Specifies the settings on a object. + + + + + Initializes a new instance of the class. + + + + + Gets or sets how reference loops (e.g. a class referencing itself) is handled. + + Reference loop handling. + + + + Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. + + Missing member handling. + + + + Gets or sets how objects are created during deserialization. + + The object creation handling. + + + + Gets or sets how null values are handled during serialization and deserialization. + + Null value handling. + + + + Gets or sets how null default are handled during serialization and deserialization. + + The default value handling. + + + + Gets or sets a collection that will be used during serialization. + + The converters. + + + + Gets or sets how object references are preserved by the serializer. + + The preserve references handling. + + + + Gets or sets how type name writing and reading is handled by the serializer. + + The type name handling. + + + + Gets or sets how metadata properties are used during deserialization. + + The metadata properties handling. + + + + Gets or sets how a type name assembly is written and resolved by the serializer. + + The type name assembly format. + + + + Gets or sets how constructors are used during deserialization. + + The constructor handling. + + + + Gets or sets the contract resolver used by the serializer when + serializing .NET objects to JSON and vice versa. + + The contract resolver. + + + + Gets or sets the equality comparer used by the serializer when comparing references. + + The equality comparer. + + + + Gets or sets the used by the serializer when resolving references. + + The reference resolver. + + + + Gets or sets a function that creates the used by the serializer when resolving references. + + A function that creates the used by the serializer when resolving references. + + + + Gets or sets the used by the serializer when writing trace messages. + + The trace writer. + + + + Gets or sets the used by the serializer when resolving type names. + + The binder. + + + + Gets or sets the error handler called during serialization and deserialization. + + The error handler called during serialization and deserialization. + + + + Gets or sets the used by the serializer when invoking serialization callback methods. + + The context. + + + + Get or set how and values are formatted when writing JSON text, and the expected date format when reading JSON text. + + + + + Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + + + + + Indicates how JSON text output is formatted. + + + + + Get or set how dates are written to JSON text. + + + + + Get or set how time zones are handling during serialization and deserialization. + + + + + Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. + + + + + Get or set how special floating point numbers, e.g. , + and , + are written as JSON. + + + + + Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Get or set how strings are escaped when writing JSON text. + + + + + Gets or sets the culture used when reading JSON. Defaults to . + + + + + Gets a value indicating whether there will be a check for additional content after deserializing an object. + + + true if there will be a check for additional content after deserializing an object; otherwise, false. + + + + + Represents a reader that provides fast, non-cached, forward-only access to JSON text data. + + + + + Initializes a new instance of the class with the specified . + + The TextReader containing the XML data to read. + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Reads the next JSON token from the stream as a []. + + + A [] or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Changes the state to closed. + + + + + Gets a value indicating whether the class can return line information. + + + true if LineNumber and LinePosition can be provided; otherwise, false. + + + + + Gets the current line number. + + + The current line number or 0 if no line information is available (for example, HasLineInfo returns false). + + + + + Gets the current line position. + + + The current line position or 0 if no line information is available (for example, HasLineInfo returns false). + + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Creates an instance of the JsonWriter class using the specified . + + The TextWriter to write to. + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Closes this stream and the underlying stream. + + + + + Writes the beginning of a JSON object. + + + + + Writes the beginning of a JSON array. + + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes the specified end token. + + The end token to write. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + A flag to indicate whether the text should be escaped when it is written as a JSON property name. + + + + Writes indent characters. + + + + + Writes the JSON value delimiter. + + + + + Writes an indent space. + + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes raw JSON. + + The raw JSON to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes out the given white space. + + The string of white space characters. + + + + Gets or sets how many IndentChars to write for each level in the hierarchy when is set to Formatting.Indented. + + + + + Gets or sets which character to use to quote attribute values. + + + + + Gets or sets which character to use for indenting when is set to Formatting.Indented. + + + + + Gets or sets a value indicating whether object names will be surrounded with quotes. + + + + + Specifies the type of JSON token. + + + + + This is returned by the if a method has not been called. + + + + + An object start token. + + + + + An array start token. + + + + + A constructor start token. + + + + + An object property name. + + + + + A comment. + + + + + Raw JSON. + + + + + An integer. + + + + + A float. + + + + + A string. + + + + + A boolean. + + + + + A null token. + + + + + An undefined token. + + + + + An object end token. + + + + + An array end token. + + + + + A constructor end token. + + + + + A Date. + + + + + Byte data. + + + + + + Represents a reader that provides validation. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Initializes a new instance of the class that + validates the content returned from the given . + + The to read from while validating. + + + + Reads the next JSON token from the stream as a . + + A . + + + + Reads the next JSON token from the stream as a []. + + + A [] or a null reference if the next JSON token is null. + + + + + Reads the next JSON token from the stream as a . + + A . + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Sets an event handler for receiving schema validation errors. + + + + + Gets the text value of the current JSON token. + + + + + + Gets the depth of the current token in the JSON document. + + The depth of the current token in the JSON document. + + + + Gets the path of the current JSON token. + + + + + Gets the quotation mark character used to enclose the value of a string. + + + + + + Gets the type of the current JSON token. + + + + + + Gets the Common Language Runtime (CLR) type for the current JSON token. + + + + + + Gets or sets the schema. + + The schema. + + + + Gets the used to construct this . + + The specified in the constructor. + + + + The exception thrown when an error occurs while reading JSON text. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Gets the path to the JSON where the error occurred. + + The path to the JSON where the error occurred. + + + + Contains the LINQ to JSON extension methods. + + + + + Returns a collection of tokens that contains the ancestors of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains the ancestors of every token in the source collection. + + + + Returns a collection of tokens that contains every token in the source collection, and the ancestors of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains every token in the source collection, the ancestors of every token in the source collection. + + + + Returns a collection of tokens that contains the descendants of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains the descendants of every token in the source collection. + + + + Returns a collection of tokens that contains every token in the source collection, and the descendants of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains every token in the source collection, and the descendants of every token in the source collection. + + + + Returns a collection of child properties of every object in the source collection. + + An of that contains the source collection. + An of that contains the properties of every object in the source collection. + + + + Returns a collection of child values of every object in the source collection with the given key. + + An of that contains the source collection. + The token key. + An of that contains the values of every token in the source collection with the given key. + + + + Returns a collection of child values of every object in the source collection. + + An of that contains the source collection. + An of that contains the values of every token in the source collection. + + + + Returns a collection of converted child values of every object in the source collection with the given key. + + The type to convert the values to. + An of that contains the source collection. + The token key. + An that contains the converted values of every token in the source collection with the given key. + + + + Returns a collection of converted child values of every object in the source collection. + + The type to convert the values to. + An of that contains the source collection. + An that contains the converted values of every token in the source collection. + + + + Converts the value. + + The type to convert the value to. + A cast as a of . + A converted value. + + + + Converts the value. + + The source collection type. + The type to convert the value to. + A cast as a of . + A converted value. + + + + Returns a collection of child tokens of every array in the source collection. + + The source collection type. + An of that contains the source collection. + An of that contains the values of every token in the source collection. + + + + Returns a collection of converted child tokens of every array in the source collection. + + An of that contains the source collection. + The type to convert the values to. + The source collection type. + An that contains the converted values of every token in the source collection. + + + + Returns the input typed as . + + An of that contains the source collection. + The input typed as . + + + + Returns the input typed as . + + The source collection type. + An of that contains the source collection. + The input typed as . + + + + Represents a collection of objects. + + The type of token + + + + Gets the with the specified key. + + + + + + Represents a JSON array. + + + + + + + + Represents a token that can contain other tokens. + + + + + Represents an abstract JSON token. + + + + + Compares the values of two tokens, including the values of all descendant tokens. + + The first to compare. + The second to compare. + true if the tokens are equal; otherwise false. + + + + Adds the specified content immediately after this token. + + A content object that contains simple content or a collection of content objects to be added after this token. + + + + Adds the specified content immediately before this token. + + A content object that contains simple content or a collection of content objects to be added before this token. + + + + Returns a collection of the ancestor tokens of this token. + + A collection of the ancestor tokens of this token. + + + + Returns a collection of tokens that contain this token, and the ancestors of this token. + + A collection of tokens that contain this token, and the ancestors of this token. + + + + Returns a collection of the sibling tokens after this token, in document order. + + A collection of the sibling tokens after this tokens, in document order. + + + + Returns a collection of the sibling tokens before this token, in document order. + + A collection of the sibling tokens before this token, in document order. + + + + Gets the with the specified key converted to the specified type. + + The type to convert the token to. + The token key. + The converted token value. + + + + Returns a collection of the child tokens of this token, in document order. + + An of containing the child tokens of this , in document order. + + + + Returns a collection of the child tokens of this token, in document order, filtered by the specified type. + + The type to filter the child tokens on. + A containing the child tokens of this , in document order. + + + + Returns a collection of the child values of this token, in document order. + + The type to convert the values to. + A containing the child values of this , in document order. + + + + Removes this token from its parent. + + + + + Replaces this token with the specified token. + + The value. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Returns the indented JSON for this token. + + + The indented JSON for this token. + + + + + Returns the JSON for this token using the given formatting and converters. + + Indicates how the output is formatted. + A collection of which will be used when writing the token. + The JSON for this token using the given formatting and converters. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to []. + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from [] to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Creates an for this token. + + An that can be used to read this token and its descendants. + + + + Creates a from an object. + + The object that will be used to create . + A with the value of the specified object + + + + Creates a from an object using the specified . + + The object that will be used to create . + The that will be used when reading the object. + A with the value of the specified object + + + + Creates the specified .NET type from the . + + The object type that the token will be deserialized to. + The new object created from the JSON value. + + + + Creates the specified .NET type from the . + + The object type that the token will be deserialized to. + The new object created from the JSON value. + + + + Creates the specified .NET type from the using the specified . + + The object type that the token will be deserialized to. + The that will be used when creating the object. + The new object created from the JSON value. + + + + Creates the specified .NET type from the using the specified . + + The object type that the token will be deserialized to. + The that will be used when creating the object. + The new object created from the JSON value. + + + + Creates a from a . + + An positioned at the token to read into this . + + An that contains the token and its descendant tokens + that were read from the reader. The runtime type of the token is determined + by the token type of the first token encountered in the reader. + + + + + Load a from a string that contains JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + Creates a from a . + + An positioned at the token to read into this . + + An that contains the token and its descendant tokens + that were read from the reader. The runtime type of the token is determined + by the token type of the first token encountered in the reader. + + + + + Selects a using a JPath expression. Selects the token that matches the object path. + + + A that contains a JPath expression. + + A , or null. + + + + Selects a using a JPath expression. Selects the token that matches the object path. + + + A that contains a JPath expression. + + A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. + A . + + + + Selects a collection of elements using a JPath expression. + + + A that contains a JPath expression. + + An that contains the selected elements. + + + + Selects a collection of elements using a JPath expression. + + + A that contains a JPath expression. + + A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. + An that contains the selected elements. + + + + Returns the responsible for binding operations performed on this object. + + The expression tree representation of the runtime value. + + The to bind this object. + + + + + Returns the responsible for binding operations performed on this object. + + The expression tree representation of the runtime value. + + The to bind this object. + + + + + Creates a new instance of the . All child tokens are recursively cloned. + + A new instance of the . + + + + Adds an object to the annotation list of this . + + The annotation to add. + + + + Get the first annotation object of the specified type from this . + + The type of the annotation to retrieve. + The first annotation object that matches the specified type, or null if no annotation is of the specified type. + + + + Gets the first annotation object of the specified type from this . + + The of the annotation to retrieve. + The first annotation object that matches the specified type, or null if no annotation is of the specified type. + + + + Gets a collection of annotations of the specified type for this . + + The type of the annotations to retrieve. + An that contains the annotations for this . + + + + Gets a collection of annotations of the specified type for this . + + The of the annotations to retrieve. + An of that contains the annotations that match the specified type for this . + + + + Removes the annotations of the specified type from this . + + The type of annotations to remove. + + + + Removes the annotations of the specified type from this . + + The of annotations to remove. + + + + Gets a comparer that can compare two tokens for value equality. + + A that can compare two nodes for value equality. + + + + Gets or sets the parent. + + The parent. + + + + Gets the root of this . + + The root of this . + + + + Gets the node type for this . + + The type. + + + + Gets a value indicating whether this token has child tokens. + + + true if this token has child values; otherwise, false. + + + + + Gets the next sibling token of this node. + + The that contains the next sibling token. + + + + Gets the previous sibling token of this node. + + The that contains the previous sibling token. + + + + Gets the path of the JSON token. + + + + + Gets the with the specified key. + + The with the specified key. + + + + Get the first child token of this token. + + A containing the first child token of the . + + + + Get the last child token of this token. + + A containing the last child token of the . + + + + Raises the event. + + The instance containing the event data. + + + + Raises the event. + + The instance containing the event data. + + + + Raises the event. + + The instance containing the event data. + + + + Returns a collection of the child tokens of this token, in document order. + + + An of containing the child tokens of this , in document order. + + + + + Returns a collection of the child values of this token, in document order. + + The type to convert the values to. + + A containing the child values of this , in document order. + + + + + Returns a collection of the descendant tokens for this token in document order. + + An containing the descendant tokens of the . + + + + Returns a collection of the tokens that contain this token, and all descendant tokens of this token, in document order. + + An containing this token, and all the descendant tokens of the . + + + + Adds the specified content as children of this . + + The content to be added. + + + + Adds the specified content as the first children of this . + + The content to be added. + + + + Creates an that can be used to add tokens to the . + + An that is ready to have content written to it. + + + + Replaces the children nodes of this token with the specified content. + + The content. + + + + Removes the child nodes from this token. + + + + + Merge the specified content into this . + + The content to be merged. + + + + Merge the specified content into this using . + + The content to be merged. + The used to merge the content. + + + + Occurs when the list changes or an item in the list changes. + + + + + Occurs before an item is added to the collection. + + + + + Occurs when the items list of the collection has changed, or the collection is reset. + + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets a value indicating whether this token has child tokens. + + + true if this token has child values; otherwise, false. + + + + + Get the first child token of this token. + + + A containing the first child token of the . + + + + + Get the last child token of this token. + + + A containing the last child token of the . + + + + + Gets the count of child JSON tokens. + + The count of child JSON tokens + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the specified content. + + The contents of the array. + + + + Initializes a new instance of the class with the specified content. + + The contents of the array. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Load a from a string that contains JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + + + + Creates a from an object. + + The object that will be used to create . + A with the values of the specified object + + + + Creates a from an object. + + The object that will be used to create . + The that will be used to read the object. + A with the values of the specified object + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Inserts an item to the at the specified index. + + The zero-based index at which should be inserted. + The object to insert into the . + + is not a valid index in the . + The is read-only. + + + + Removes the item at the specified index. + + The zero-based index of the item to remove. + + is not a valid index in the . + The is read-only. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Adds an item to the . + + The object to add to the . + The is read-only. + + + + Removes all items from the . + + The is read-only. + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Copies to. + + The array. + Index of the array. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + The is read-only. + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets the node type for this . + + The type. + + + + Gets the with the specified key. + + The with the specified key. + + + + Gets or sets the at the specified index. + + + + + + Gets a value indicating whether the is read-only. + + true if the is read-only; otherwise, false. + + + + Represents a JSON constructor. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the specified name and content. + + The constructor name. + The contents of the constructor. + + + + Initializes a new instance of the class with the specified name and content. + + The constructor name. + The contents of the constructor. + + + + Initializes a new instance of the class with the specified name. + + The constructor name. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets or sets the name of this constructor. + + The constructor name. + + + + Gets the node type for this . + + The type. + + + + Gets the with the specified key. + + The with the specified key. + + + + Represents a collection of objects. + + The type of token + + + + An empty collection of objects. + + + + + Initializes a new instance of the struct. + + The enumerable. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Gets the with the specified key. + + + + + + Represents a JSON object. + + + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the specified content. + + The contents of the object. + + + + Initializes a new instance of the class with the specified content. + + The contents of the object. + + + + Gets an of this object's properties. + + An of this object's properties. + + + + Gets a the specified name. + + The property name. + A with the specified name or null. + + + + Gets an of this object's property values. + + An of this object's property values. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Load a from a string that contains JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + + + + Creates a from an object. + + The object that will be used to create . + A with the values of the specified object + + + + Creates a from an object. + + The object that will be used to create . + The that will be used to read the object. + A with the values of the specified object + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Gets the with the specified property name. + + Name of the property. + The with the specified property name. + + + + Gets the with the specified property name. + The exact property name will be searched for first and if no matching property is found then + the will be used to match a property. + + Name of the property. + One of the enumeration values that specifies how the strings will be compared. + The with the specified property name. + + + + Tries to get the with the specified property name. + The exact property name will be searched for first and if no matching property is found then + the will be used to match a property. + + Name of the property. + The value. + One of the enumeration values that specifies how the strings will be compared. + true if a value was successfully retrieved; otherwise, false. + + + + Adds the specified property name. + + Name of the property. + The value. + + + + Removes the property with the specified name. + + Name of the property. + true if item was successfully removed; otherwise, false. + + + + Tries the get value. + + Name of the property. + The value. + true if a value was successfully retrieved; otherwise, false. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Raises the event with the provided arguments. + + Name of the property. + + + + Raises the event with the provided arguments. + + Name of the property. + + + + Returns the properties for this instance of a component. + + + A that represents the properties for this component instance. + + + + + Returns the properties for this instance of a component using the attribute array as a filter. + + An array of type that is used as a filter. + + A that represents the filtered properties for this component instance. + + + + + Returns a collection of custom attributes for this instance of a component. + + + An containing the attributes for this object. + + + + + Returns the class name of this instance of a component. + + + The class name of the object, or null if the class does not have a name. + + + + + Returns the name of this instance of a component. + + + The name of the object, or null if the object does not have a name. + + + + + Returns a type converter for this instance of a component. + + + A that is the converter for this object, or null if there is no for this object. + + + + + Returns the default event for this instance of a component. + + + An that represents the default event for this object, or null if this object does not have events. + + + + + Returns the default property for this instance of a component. + + + A that represents the default property for this object, or null if this object does not have properties. + + + + + Returns an editor of the specified type for this instance of a component. + + A that represents the editor for this object. + + An of the specified type that is the editor for this object, or null if the editor cannot be found. + + + + + Returns the events for this instance of a component using the specified attribute array as a filter. + + An array of type that is used as a filter. + + An that represents the filtered events for this component instance. + + + + + Returns the events for this instance of a component. + + + An that represents the events for this component instance. + + + + + Returns an object that contains the property described by the specified property descriptor. + + A that represents the property whose owner is to be found. + + An that represents the owner of the specified property. + + + + + Returns the responsible for binding operations performed on this object. + + The expression tree representation of the runtime value. + + The to bind this object. + + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Occurs when a property value changes. + + + + + Occurs when a property value is changing. + + + + + Gets the node type for this . + + The type. + + + + Gets the with the specified key. + + The with the specified key. + + + + Gets or sets the with the specified property name. + + + + + + Specifies the settings used when merging JSON. + + + + + Gets or sets the method used when merging JSON arrays. + + The method used when merging JSON arrays. + + + + Represents a JSON property. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class. + + The property name. + The property content. + + + + Initializes a new instance of the class. + + The property name. + The property content. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets the property name. + + The property name. + + + + Gets or sets the property value. + + The property value. + + + + Gets the node type for this . + + The type. + + + + Represents a view of a . + + + + + Initializes a new instance of the class. + + The name. + + + + When overridden in a derived class, returns whether resetting an object changes its value. + + + true if resetting the component changes its value; otherwise, false. + + The component to test for reset capability. + + + + + When overridden in a derived class, gets the current value of the property on a component. + + + The value of a property for a given component. + + The component with the property for which to retrieve the value. + + + + + When overridden in a derived class, resets the value for this property of the component to the default value. + + The component with the property value that is to be reset to the default value. + + + + + When overridden in a derived class, sets the value of the component to a different value. + + The component with the property value that is to be set. + The new value. + + + + + When overridden in a derived class, determines a value indicating whether the value of this property needs to be persisted. + + + true if the property should be persisted; otherwise, false. + + The component with the property to be examined for persistence. + + + + + When overridden in a derived class, gets the type of the component this property is bound to. + + + A that represents the type of component this property is bound to. When the or methods are invoked, the object specified might be an instance of this type. + + + + + When overridden in a derived class, gets a value indicating whether this property is read-only. + + + true if the property is read-only; otherwise, false. + + + + + When overridden in a derived class, gets the type of the property. + + + A that represents the type of the property. + + + + + Gets the hash code for the name of the member. + + + + The hash code for the name of the member. + + + + + Represents a raw JSON string. + + + + + Represents a value in JSON (string, integer, date, etc). + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Creates a comment with the given value. + + The value. + A comment with the given value. + + + + Creates a string with the given value. + + The value. + A string with the given value. + + + + Creates a null value. + + A null value. + + + + Creates a null value. + + A null value. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Indicates whether the current object is equal to another object of the same type. + + + true if the current object is equal to the parameter; otherwise, false. + + An object to compare with this object. + + + + Determines whether the specified is equal to the current . + + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + + The parameter is null. + + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The format. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The format provider. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The format. + The format provider. + + A that represents this instance. + + + + + Returns the responsible for binding operations performed on this object. + + The expression tree representation of the runtime value. + + The to bind this object. + + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings: + Value + Meaning + Less than zero + This instance is less than . + Zero + This instance is equal to . + Greater than zero + This instance is greater than . + + + is not the same type as this instance. + + + + + Gets a value indicating whether this token has child tokens. + + + true if this token has child values; otherwise, false. + + + + + Gets the node type for this . + + The type. + + + + Gets or sets the underlying token value. + + The underlying token value. + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class. + + The raw json. + + + + Creates an instance of with the content of the reader's current token. + + The reader. + An instance of with the content of the reader's current token. + + + + Compares tokens to determine whether they are equal. + + + + + Determines whether the specified objects are equal. + + The first object of type to compare. + The second object of type to compare. + + true if the specified objects are equal; otherwise, false. + + + + + Returns a hash code for the specified object. + + The for which a hash code is to be returned. + A hash code for the specified object. + The type of is a reference type and is null. + + + + Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. + + + + + Initializes a new instance of the class. + + The token to read from. + + + + Reads the next JSON token from the stream as a []. + + + A [] or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Gets the at the reader's current position. + + + + + Gets the path of the current JSON token. + + + + + Specifies the type of token. + + + + + No token type has been set. + + + + + A JSON object. + + + + + A JSON array. + + + + + A JSON constructor. + + + + + A JSON object property. + + + + + A comment. + + + + + An integer value. + + + + + A float value. + + + + + A string value. + + + + + A boolean value. + + + + + A null value. + + + + + An undefined value. + + + + + A date value. + + + + + A raw JSON value. + + + + + A collection of bytes value. + + + + + A Guid value. + + + + + A Uri value. + + + + + A TimeSpan value. + + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Initializes a new instance of the class writing to the given . + + The container being written to. + + + + Initializes a new instance of the class. + + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Closes this stream and the underlying stream. + + + + + Writes the beginning of a JSON object. + + + + + Writes the beginning of a JSON array. + + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes the end. + + The token. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes raw JSON. + + The raw JSON to write. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Gets the at the writer's current position. + + + + + Gets the token being writen. + + The token being writen. + + + + Specifies how JSON arrays are merged together. + + + + Concatenate arrays. + + + Union arrays, skipping items that already exist. + + + Replace all array items. + + + Merge array items together, matched by index. + + + + Specifies the member serialization options for the . + + + + + All public members are serialized by default. Members can be excluded using or . + This is the default member serialization mode. + + + + + Only members must be marked with or are serialized. + This member serialization mode can also be set by marking the class with . + + + + + All public and private fields are serialized. Members can be excluded using or . + This member serialization mode can also be set by marking the class with + and setting IgnoreSerializableAttribute on to false. + + + + + Specifies metadata property handling options for the . + + + + + Read metadata properties located at the start of a JSON object. + + + + + Read metadata properties located anywhere in a JSON object. Note that this setting will impact performance. + + + + + Do not try to read metadata properties. + + + + + Specifies missing member handling options for the . + + + + + Ignore a missing member and do not attempt to deserialize it. + + + + + Throw a when a missing member is encountered during deserialization. + + + + + Specifies null value handling options for the . + + + + + + + + + Include null values when serializing and deserializing objects. + + + + + Ignore null values when serializing and deserializing objects. + + + + + Specifies how object creation is handled by the . + + + + + Reuse existing objects, create new objects when needed. + + + + + Only reuse existing objects. + + + + + Always create new objects. + + + + + Specifies reference handling options for the . + Note that references cannot be preserved when a value is set via a non-default constructor such as types that implement ISerializable. + + + + + + + + Do not preserve references when serializing types. + + + + + Preserve references when serializing into a JSON object structure. + + + + + Preserve references when serializing into a JSON array structure. + + + + + Preserve references when serializing. + + + + + Specifies reference loop handling options for the . + + + + + Throw a when a loop is encountered. + + + + + Ignore loop references and do not serialize. + + + + + Serialize loop references. + + + + + Indicating whether a property is required. + + + + + The property is not required. The default state. + + + + + The property must be defined in JSON but can be a null value. + + + + + The property must be defined in JSON and cannot be a null value. + + + + + + Contains the JSON schema extension methods. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + + Determines whether the is valid. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + + true if the specified is valid; otherwise, false. + + + + + + Determines whether the is valid. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + When this method returns, contains any error messages generated while validating. + + true if the specified is valid; otherwise, false. + + + + + + Validates the specified . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + + + + + Validates the specified . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + The validation event handler. + + + + + An in-memory representation of a JSON Schema. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Initializes a new instance of the class. + + + + + Reads a from the specified . + + The containing the JSON Schema to read. + The object representing the JSON Schema. + + + + Reads a from the specified . + + The containing the JSON Schema to read. + The to use when resolving schema references. + The object representing the JSON Schema. + + + + Load a from a string that contains schema JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + Parses the specified json. + + The json. + The resolver. + A populated from the string that contains JSON. + + + + Writes this schema to a . + + A into which this method will write. + + + + Writes this schema to a using the specified . + + A into which this method will write. + The resolver used. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets or sets the id. + + + + + Gets or sets the title. + + + + + Gets or sets whether the object is required. + + + + + Gets or sets whether the object is read only. + + + + + Gets or sets whether the object is visible to users. + + + + + Gets or sets whether the object is transient. + + + + + Gets or sets the description of the object. + + + + + Gets or sets the types of values allowed by the object. + + The type. + + + + Gets or sets the pattern. + + The pattern. + + + + Gets or sets the minimum length. + + The minimum length. + + + + Gets or sets the maximum length. + + The maximum length. + + + + Gets or sets a number that the value should be divisble by. + + A number that the value should be divisble by. + + + + Gets or sets the minimum. + + The minimum. + + + + Gets or sets the maximum. + + The maximum. + + + + Gets or sets a flag indicating whether the value can not equal the number defined by the "minimum" attribute. + + A flag indicating whether the value can not equal the number defined by the "minimum" attribute. + + + + Gets or sets a flag indicating whether the value can not equal the number defined by the "maximum" attribute. + + A flag indicating whether the value can not equal the number defined by the "maximum" attribute. + + + + Gets or sets the minimum number of items. + + The minimum number of items. + + + + Gets or sets the maximum number of items. + + The maximum number of items. + + + + Gets or sets the of items. + + The of items. + + + + Gets or sets a value indicating whether items in an array are validated using the instance at their array position from . + + + true if items are validated using their array position; otherwise, false. + + + + + Gets or sets the of additional items. + + The of additional items. + + + + Gets or sets a value indicating whether additional items are allowed. + + + true if additional items are allowed; otherwise, false. + + + + + Gets or sets whether the array items must be unique. + + + + + Gets or sets the of properties. + + The of properties. + + + + Gets or sets the of additional properties. + + The of additional properties. + + + + Gets or sets the pattern properties. + + The pattern properties. + + + + Gets or sets a value indicating whether additional properties are allowed. + + + true if additional properties are allowed; otherwise, false. + + + + + Gets or sets the required property if this property is present. + + The required property if this property is present. + + + + Gets or sets the a collection of valid enum values allowed. + + A collection of valid enum values allowed. + + + + Gets or sets disallowed types. + + The disallow types. + + + + Gets or sets the default value. + + The default value. + + + + Gets or sets the collection of that this schema extends. + + The collection of that this schema extends. + + + + Gets or sets the format. + + The format. + + + + + Returns detailed information about the schema exception. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + Gets the line number indicating where the error occurred. + + The line number indicating where the error occurred. + + + + Gets the line position indicating where the error occurred. + + The line position indicating where the error occurred. + + + + Gets the path to the JSON where the error occurred. + + The path to the JSON where the error occurred. + + + + + Generates a from a specified . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Generate a from the specified type. + + The type to generate a from. + A generated from the specified type. + + + + Generate a from the specified type. + + The type to generate a from. + The used to resolve schema references. + A generated from the specified type. + + + + Generate a from the specified type. + + The type to generate a from. + Specify whether the generated root will be nullable. + A generated from the specified type. + + + + Generate a from the specified type. + + The type to generate a from. + The used to resolve schema references. + Specify whether the generated root will be nullable. + A generated from the specified type. + + + + Gets or sets how undefined schemas are handled by the serializer. + + + + + Gets or sets the contract resolver. + + The contract resolver. + + + + + Resolves from an id. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Initializes a new instance of the class. + + + + + Gets a for the specified reference. + + The id. + A for the specified reference. + + + + Gets or sets the loaded schemas. + + The loaded schemas. + + + + + The value types allowed by the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + No type specified. + + + + + String type. + + + + + Float type. + + + + + Integer type. + + + + + Boolean type. + + + + + Object type. + + + + + Array type. + + + + + Null type. + + + + + Any type. + + + + + + Specifies undefined schema Id handling options for the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Do not infer a schema Id. + + + + + Use the .NET type name as the schema Id. + + + + + Use the assembly qualified .NET type name as the schema Id. + + + + + + Returns detailed information related to the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Gets the associated with the validation error. + + The JsonSchemaException associated with the validation error. + + + + Gets the path of the JSON location where the validation error occurred. + + The path of the JSON location where the validation error occurred. + + + + Gets the text description corresponding to the validation error. + + The text description. + + + + + Represents the callback method that will handle JSON schema validation events and the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Resolves member mappings for a type, camel casing property names. + + + + + Used by to resolves a for a given . + + + + + Used by to resolves a for a given . + + + + + + + + + Resolves the contract for a given type. + + The type to resolve a contract for. + The contract for a given type. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + If set to true the will use a cached shared with other resolvers of the same type. + Sharing the cache will significantly improve performance with multiple resolver instances because expensive reflection will only + happen once. This setting can cause unexpected behavior if different instances of the resolver are suppose to produce different + results. When set to false it is highly recommended to reuse instances with the . + + + + + Resolves the contract for a given type. + + The type to resolve a contract for. + The contract for a given type. + + + + Gets the serializable members for the type. + + The type to get serializable members for. + The serializable members for the type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates the constructor parameters. + + The constructor to create properties for. + The type's member properties. + Properties for the given . + + + + Creates a for the given . + + The matching member property. + The constructor parameter. + A created for the given . + + + + Resolves the default for the contract. + + Type of the object. + The contract's default . + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Determines which contract type is created for the given type. + + Type of the object. + A for the given type. + + + + Creates properties for the given . + + The type to create properties for. + /// The member serialization mode for the type. + Properties for the given . + + + + Creates the used by the serializer to get and set values from a member. + + The member. + The used by the serializer to get and set values from a member. + + + + Creates a for the given . + + The member's parent . + The member to create a for. + A created for the given . + + + + Resolves the name of the property. + + Name of the property. + Resolved name of the property. + + + + Resolves the key of the dictionary. By default is used to resolve dictionary keys. + + Key of the dictionary. + Resolved key of the dictionary. + + + + Gets the resolved name of the property. + + Name of the property. + Name of the property. + + + + Gets a value indicating whether members are being get and set using dynamic code generation. + This value is determined by the runtime permissions available. + + + true if using dynamic code generation; otherwise, false. + + + + + Gets or sets the default members search flags. + + The default members search flags. + + + + Gets or sets a value indicating whether compiler generated members should be serialized. + + + true if serialized compiler generated members; otherwise, false. + + + + + Gets or sets a value indicating whether to ignore the interface when serializing and deserializing types. + + + true if the interface will be ignored when serializing and deserializing types; otherwise, false. + + + + + Gets or sets a value indicating whether to ignore the attribute when serializing and deserializing types. + + + true if the attribute will be ignored when serializing and deserializing types; otherwise, false. + + + + + Initializes a new instance of the class. + + + + + Resolves the name of the property. + + Name of the property. + The property name camel cased. + + + + Used to resolve references when serializing and deserializing JSON by the . + + + + + Resolves a reference to its object. + + The serialization context. + The reference to resolve. + The object that + + + + Gets the reference for the sepecified object. + + The serialization context. + The object to get a reference for. + The reference to the object. + + + + Determines whether the specified object is referenced. + + The serialization context. + The object to test for a reference. + + true if the specified object is referenced; otherwise, false. + + + + + Adds a reference to the specified object. + + The serialization context. + The reference. + The object to reference. + + + + The default serialization binder used when resolving and loading classes from type names. + + + + + When overridden in a derived class, controls the binding of a serialized object to a type. + + Specifies the name of the serialized object. + Specifies the name of the serialized object. + + The type of the object the formatter creates a new instance of. + + + + + When overridden in a derived class, controls the binding of a serialized object to a type. + + The type of the object the formatter creates a new instance of. + Specifies the name of the serialized object. + Specifies the name of the serialized object. + + + + Represents a trace writer that writes to the application's instances. + + + + + Represents a trace writer. + + + + + Writes the specified trace level, message and optional exception. + + The at which to write this trace. + The trace message. + The trace exception. This parameter is optional. + + + + Gets the that will be used to filter the trace messages passed to the writer. + For example a filter level of Info will exclude Verbose messages and include Info, + Warning and Error messages. + + The that will be used to filter the trace messages passed to the writer. + + + + Writes the specified trace level, message and optional exception. + + The at which to write this trace. + The trace message. + The trace exception. This parameter is optional. + + + + Gets the that will be used to filter the trace messages passed to the writer. + For example a filter level of Info will exclude Verbose messages and include Info, + Warning and Error messages. + + + The that will be used to filter the trace messages passed to the writer. + + + + + Get and set values for a using dynamic methods. + + + + + Provides methods to get and set values. + + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + Initializes a new instance of the class. + + The member info. + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + Provides information surrounding an error. + + + + + Gets the error. + + The error. + + + + Gets the original object that caused the error. + + The original object that caused the error. + + + + Gets the member that caused the error. + + The member that caused the error. + + + + Gets the path of the JSON location where the error occurred. + + The path of the JSON location where the error occurred. + + + + Gets or sets a value indicating whether this is handled. + + true if handled; otherwise, false. + + + + Provides data for the Error event. + + + + + Initializes a new instance of the class. + + The current object. + The error context. + + + + Gets the current object the error event is being raised against. + + The current object the error event is being raised against. + + + + Gets the error context. + + The error context. + + + + Get and set values for a using dynamic methods. + + + + + Initializes a new instance of the class. + + The member info. + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + Provides methods to get attributes. + + + + + Returns a collection of all of the attributes, or an empty collection if there are no attributes. + + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Returns a collection of attributes, identified by type, or an empty collection if there are no attributes. + + The type of the attributes. + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Contract details for a used by the . + + + + + Contract details for a used by the . + + + + + Contract details for a used by the . + + + + + Gets the underlying type for the contract. + + The underlying type for the contract. + + + + Gets or sets the type created during deserialization. + + The type created during deserialization. + + + + Gets or sets whether this type contract is serialized as a reference. + + Whether this type contract is serialized as a reference. + + + + Gets or sets the default for this contract. + + The converter. + + + + Gets or sets all methods called immediately after deserialization of the object. + + The methods called immediately after deserialization of the object. + + + + Gets or sets all methods called during deserialization of the object. + + The methods called during deserialization of the object. + + + + Gets or sets all methods called after serialization of the object graph. + + The methods called after serialization of the object graph. + + + + Gets or sets all methods called before serialization of the object. + + The methods called before serialization of the object. + + + + Gets or sets all method called when an error is thrown during the serialization of the object. + + The methods called when an error is thrown during the serialization of the object. + + + + Gets or sets the method called immediately after deserialization of the object. + + The method called immediately after deserialization of the object. + + + + Gets or sets the method called during deserialization of the object. + + The method called during deserialization of the object. + + + + Gets or sets the method called after serialization of the object graph. + + The method called after serialization of the object graph. + + + + Gets or sets the method called before serialization of the object. + + The method called before serialization of the object. + + + + Gets or sets the method called when an error is thrown during the serialization of the object. + + The method called when an error is thrown during the serialization of the object. + + + + Gets or sets the default creator method used to create the object. + + The default creator method used to create the object. + + + + Gets or sets a value indicating whether the default creator is non public. + + true if the default object creator is non-public; otherwise, false. + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets or sets the default collection items . + + The converter. + + + + Gets or sets a value indicating whether the collection items preserve object references. + + true if collection items preserve object references; otherwise, false. + + + + Gets or sets the collection item reference loop handling. + + The reference loop handling. + + + + Gets or sets the collection item type name handling. + + The type name handling. + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets the of the collection items. + + The of the collection items. + + + + Gets a value indicating whether the collection type is a multidimensional array. + + true if the collection type is a multidimensional array; otherwise, false. + + + + Handles serialization callback events. + + The object that raised the callback event. + The streaming context. + + + + Handles serialization error callback events. + + The object that raised the callback event. + The streaming context. + The error context. + + + + Sets extension data for an object during deserialization. + + The object to set extension data on. + The extension data key. + The extension data value. + + + + Gets extension data for an object during serialization. + + The object to set extension data on. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets or sets the property name resolver. + + The property name resolver. + + + + Gets or sets the dictionary key resolver. + + The dictionary key resolver. + + + + Gets the of the dictionary keys. + + The of the dictionary keys. + + + + Gets the of the dictionary values. + + The of the dictionary values. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets the object's properties. + + The object's properties. + + + + Gets or sets the property name resolver. + + The property name resolver. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets or sets the ISerializable object constructor. + + The ISerializable object constructor. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets or sets the object member serialization. + + The member object serialization. + + + + Gets or sets a value that indicates whether the object's properties are required. + + + A value indicating whether the object's properties are required. + + + + + Gets the object's properties. + + The object's properties. + + + + Gets the constructor parameters required for any non-default constructor + + + + + Gets a collection of instances that define the parameters used with . + + + + + Gets or sets the override constructor used to create the object. + This is set when a constructor is marked up using the + JsonConstructor attribute. + + The override constructor. + + + + Gets or sets the parametrized constructor used to create the object. + + The parametrized constructor. + + + + Gets or sets the function used to create the object. When set this function will override . + This function is called with a collection of arguments which are defined by the collection. + + The function used to create the object. + + + + Gets or sets the extension data setter. + + + + + Gets or sets the extension data getter. + + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Maps a JSON property to a .NET member or constructor parameter. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets or sets the name of the property. + + The name of the property. + + + + Gets or sets the type that declared this property. + + The type that declared this property. + + + + Gets or sets the order of serialization and deserialization of a member. + + The numeric order of serialization or deserialization. + + + + Gets or sets the name of the underlying member or parameter. + + The name of the underlying member or parameter. + + + + Gets the that will get and set the during serialization. + + The that will get and set the during serialization. + + + + Gets or sets the for this property. + + The for this property. + + + + Gets or sets the type of the property. + + The type of the property. + + + + Gets or sets the for the property. + If set this converter takes presidence over the contract converter for the property type. + + The converter. + + + + Gets or sets the member converter. + + The member converter. + + + + Gets or sets a value indicating whether this is ignored. + + true if ignored; otherwise, false. + + + + Gets or sets a value indicating whether this is readable. + + true if readable; otherwise, false. + + + + Gets or sets a value indicating whether this is writable. + + true if writable; otherwise, false. + + + + Gets or sets a value indicating whether this has a member attribute. + + true if has a member attribute; otherwise, false. + + + + Gets the default value. + + The default value. + + + + Gets or sets a value indicating whether this is required. + + A value indicating whether this is required. + + + + Gets or sets a value indicating whether this property preserves object references. + + + true if this instance is reference; otherwise, false. + + + + + Gets or sets the property null value handling. + + The null value handling. + + + + Gets or sets the property default value handling. + + The default value handling. + + + + Gets or sets the property reference loop handling. + + The reference loop handling. + + + + Gets or sets the property object creation handling. + + The object creation handling. + + + + Gets or sets or sets the type name handling. + + The type name handling. + + + + Gets or sets a predicate used to determine whether the property should be serialize. + + A predicate used to determine whether the property should be serialize. + + + + Gets or sets a predicate used to determine whether the property should be serialized. + + A predicate used to determine whether the property should be serialized. + + + + Gets or sets an action used to set whether the property has been deserialized. + + An action used to set whether the property has been deserialized. + + + + Gets or sets the converter used when serializing the property's collection items. + + The collection's items converter. + + + + Gets or sets whether this property's collection items are serialized as a reference. + + Whether this property's collection items are serialized as a reference. + + + + Gets or sets the the type name handling used when serializing the property's collection items. + + The collection's items type name handling. + + + + Gets or sets the the reference loop handling used when serializing the property's collection items. + + The collection's items reference loop handling. + + + + A collection of objects. + + + + + Initializes a new instance of the class. + + The type. + + + + When implemented in a derived class, extracts the key from the specified element. + + The element from which to extract the key. + The key for the specified element. + + + + Adds a object. + + The property to add to the collection. + + + + Gets the closest matching object. + First attempts to get an exact case match of propertyName and then + a case insensitive match. + + Name of the property. + A matching property if found. + + + + Gets a property by property name. + + The name of the property to get. + Type property name string comparison. + A matching property if found. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Lookup and create an instance of the JsonConverter type described by the argument. + + The JsonConverter type to create. + Optional arguments to pass to an initializing constructor of the JsonConverter. + If null, the default constructor is used. + + + + Create a factory function that can be used to create instances of a JsonConverter described by the + argument type. The returned function can then be used to either invoke the converter's default ctor, or any + parameterized constructors by way of an object array. + + + + + Represents a trace writer that writes to memory. When the trace message limit is + reached then old trace messages will be removed as new messages are added. + + + + + Initializes a new instance of the class. + + + + + Writes the specified trace level, message and optional exception. + + The at which to write this trace. + The trace message. + The trace exception. This parameter is optional. + + + + Returns an enumeration of the most recent trace messages. + + An enumeration of the most recent trace messages. + + + + Returns a of the most recent trace messages. + + + A of the most recent trace messages. + + + + + Gets the that will be used to filter the trace messages passed to the writer. + For example a filter level of Info will exclude Verbose messages and include Info, + Warning and Error messages. + + + The that will be used to filter the trace messages passed to the writer. + + + + + Represents a method that constructs an object. + + The object type to create. + + + + When applied to a method, specifies that the method is called when an error occurs serializing an object. + + + + + Provides methods to get attributes from a , , or . + + + + + Initializes a new instance of the class. + + The instance to get attributes for. This parameter should be a , , or . + + + + Returns a collection of all of the attributes, or an empty collection if there are no attributes. + + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Returns a collection of attributes, identified by type, or an empty collection if there are no attributes. + + The type of the attributes. + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Get and set values for a using reflection. + + + + + Initializes a new instance of the class. + + The member info. + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + Specifies how strings are escaped when writing JSON text. + + + + + Only control characters (e.g. newline) are escaped. + + + + + All non-ASCII and control characters (e.g. newline) are escaped. + + + + + HTML (<, >, &, ', ") and control characters (e.g. newline) are escaped. + + + + + Specifies type name handling options for the . + + + + + Do not include the .NET type name when serializing types. + + + + + Include the .NET type name when serializing into a JSON object structure. + + + + + Include the .NET type name when serializing into a JSON array structure. + + + + + Always include the .NET type name when serializing. + + + + + Include the .NET type name when the type of the object being serialized is not the same as its declared type. + + + + + Determines whether the collection is null or empty. + + The collection. + + true if the collection is null or empty; otherwise, false. + + + + + Adds the elements of the specified collection to the specified generic IList. + + The list to add to. + The collection of elements to add. + + + + Returns the index of the first occurrence in a sequence by using a specified IEqualityComparer{TSource}. + + The type of the elements of source. + A sequence in which to locate a value. + The object to locate in the sequence + An equality comparer to compare values. + The zero-based index of the first occurrence of value within the entire sequence, if found; otherwise, –1. + + + + Converts the value to the specified type. If the value is unable to be converted, the + value is checked whether it assignable to the specified type. + + The value to convert. + The culture to use when converting. + The type to convert or cast the value to. + + The converted type. If conversion was unsuccessful, the initial value + is returned if assignable to the target type. + + + + + Helper method for generating a MetaObject which calls a + specific method on Dynamic that returns a result + + + + + Helper method for generating a MetaObject which calls a + specific method on Dynamic, but uses one of the arguments for + the result. + + + + + Helper method for generating a MetaObject which calls a + specific method on Dynamic, but uses one of the arguments for + the result. + + + + + Returns a Restrictions object which includes our current restrictions merged + with a restriction limiting our type + + + + + Gets a dictionary of the names and values of an Enum type. + + + + + + Gets a dictionary of the names and values of an Enum type. + + The enum type to get names and values for. + + + + + Gets the type of the typed collection's items. + + The type. + The type of the typed collection's items. + + + + Gets the member's underlying type. + + The member. + The underlying type of the member. + + + + Determines whether the member is an indexed property. + + The member. + + true if the member is an indexed property; otherwise, false. + + + + + Determines whether the property is an indexed property. + + The property. + + true if the property is an indexed property; otherwise, false. + + + + + Gets the member's value on the object. + + The member. + The target object. + The member's value on the object. + + + + Sets the member's value on the target object. + + The member. + The target. + The value. + + + + Determines whether the specified MemberInfo can be read. + + The MemberInfo to determine whether can be read. + /// if set to true then allow the member to be gotten non-publicly. + + true if the specified MemberInfo can be read; otherwise, false. + + + + + Determines whether the specified MemberInfo can be set. + + The MemberInfo to determine whether can be set. + if set to true then allow the member to be set non-publicly. + if set to true then allow the member to be set if read-only. + + true if the specified MemberInfo can be set; otherwise, false. + + + + + Builds a string. Unlike StringBuilder this class lets you reuse it's internal buffer. + + + + + Determines whether the string is all white space. Empty string will return false. + + The string to test whether it is all white space. + + true if the string is all white space; otherwise, false. + + + + + Nulls an empty string. + + The string. + Null if the string was null, otherwise the string unchanged. + + + + Specifies the state of the . + + + + + An exception has been thrown, which has left the in an invalid state. + You may call the method to put the in the Closed state. + Any other method calls results in an being thrown. + + + + + The method has been called. + + + + + An object is being written. + + + + + A array is being written. + + + + + A constructor is being written. + + + + + A property is being written. + + + + + A write method has not been called. + + + + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Portable/Newtonsoft.Json.dll b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Portable/Newtonsoft.Json.dll new file mode 100644 index 00000000..89bc2b8c Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Portable/Newtonsoft.Json.dll differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Portable/Newtonsoft.Json.pdb b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Portable/Newtonsoft.Json.pdb new file mode 100644 index 00000000..853ce8f5 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Portable/Newtonsoft.Json.pdb differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Portable/Newtonsoft.Json.xml b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Portable/Newtonsoft.Json.xml new file mode 100644 index 00000000..e80be625 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Portable/Newtonsoft.Json.xml @@ -0,0 +1,8414 @@ + + + + Newtonsoft.Json + + + + + Represents a BSON Oid (object id). + + + + + Initializes a new instance of the class. + + The Oid value. + + + + Gets or sets the value of the Oid. + + The value of the Oid. + + + + Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. + + + + + Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. + + + + + Initializes a new instance of the class with the specified . + + + + + Reads the next JSON token from the stream. + + true if the next token was read successfully; false if there are no more tokens to read. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a []. + + A [] or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Skips the children of the current token. + + + + + Sets the current token. + + The new token. + + + + Sets the current token and value. + + The new token. + The value. + + + + Sets the state based on current token type. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Releases unmanaged and - optionally - managed resources + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Changes the to Closed. + + + + + Gets the current reader state. + + The current reader state. + + + + Gets or sets a value indicating whether the underlying stream or + should be closed when the reader is closed. + + + true to close the underlying stream or when + the reader is closed; otherwise false. The default is true. + + + + + Gets or sets a value indicating whether multiple pieces of JSON content can + be read from a continuous stream without erroring. + + + true to support reading multiple pieces of JSON content; otherwise false. The default is false. + + + + + Gets the quotation mark character used to enclose the value of a string. + + + + + Get or set how time zones are handling when reading JSON. + + + + + Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. + + + + + Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Get or set how custom date formatted strings are parsed when reading JSON. + + + + + Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + + + + + Gets the type of the current JSON token. + + + + + Gets the text value of the current JSON token. + + + + + Gets The Common Language Runtime (CLR) type for the current JSON token. + + + + + Gets the depth of the current token in the JSON document. + + The depth of the current token in the JSON document. + + + + Gets the path of the current JSON token. + + + + + Gets or sets the culture used when reading JSON. Defaults to . + + + + + Specifies the state of the reader. + + + + + The Read method has not been called. + + + + + The end of the file has been reached successfully. + + + + + Reader is at a property. + + + + + Reader is at the start of an object. + + + + + Reader is in an object. + + + + + Reader is at the start of an array. + + + + + Reader is in an array. + + + + + The Close method has been called. + + + + + Reader has just read a value. + + + + + Reader is at the start of a constructor. + + + + + Reader in a constructor. + + + + + An error occurred that prevents the read operation from continuing. + + + + + The end of the file has been reached successfully. + + + + + Initializes a new instance of the class. + + The stream. + + + + Initializes a new instance of the class. + + The reader. + + + + Initializes a new instance of the class. + + The stream. + if set to true the root object will be read as a JSON array. + The used when reading values from BSON. + + + + Initializes a new instance of the class. + + The reader. + if set to true the root object will be read as a JSON array. + The used when reading values from BSON. + + + + Reads the next JSON token from the stream as a []. + + + A [] or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + + A . This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Changes the to Closed. + + + + + Gets or sets a value indicating whether binary data reading should compatible with incorrect Json.NET 3.5 written binary. + + + true if binary data reading will be compatible with incorrect Json.NET 3.5 written binary; otherwise, false. + + + + + Gets or sets a value indicating whether the root object will be read as a JSON array. + + + true if the root object will be read as a JSON array; otherwise, false. + + + + + Gets or sets the used when reading values from BSON. + + The used when reading values from BSON. + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Creates an instance of the JsonWriter class. + + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Closes this stream and the underlying stream. + + + + + Writes the beginning of a JSON object. + + + + + Writes the end of a JSON object. + + + + + Writes the beginning of a JSON array. + + + + + Writes the end of an array. + + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes the end constructor. + + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + A flag to indicate whether the text should be escaped when it is written as a JSON property name. + + + + Writes the end of the current JSON object or array. + + + + + Writes the current token and its children. + + The to read the token from. + + + + Writes the current token. + + The to read the token from. + A flag indicating whether the current token's children should be written. + + + + Writes the token and its value. + + The to write. + + The value to write. + A value is only required for tokens that have an associated value, e.g. the property name for . + A null value can be passed to the method for token's that don't have a value, e.g. . + + + + Writes the token. + + The to write. + + + + Writes the specified end token. + + The end token to write. + + + + Writes indent characters. + + + + + Writes the JSON value delimiter. + + + + + Writes an indent space. + + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes raw JSON without changing the writer's state. + + The raw JSON to write. + + + + Writes raw JSON where a value is expected and updates the writer's state. + + The raw JSON to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes out the given white space. + + The string of white space characters. + + + + Sets the state of the JsonWriter, + + The JsonToken being written. + The value being written. + + + + Gets or sets a value indicating whether the underlying stream or + should be closed when the writer is closed. + + + true to close the underlying stream or when + the writer is closed; otherwise false. The default is true. + + + + + Gets the top. + + The top. + + + + Gets the state of the writer. + + + + + Gets the path of the writer. + + + + + Indicates how JSON text output is formatted. + + + + + Get or set how dates are written to JSON text. + + + + + Get or set how time zones are handling when writing JSON text. + + + + + Get or set how strings are escaped when writing JSON text. + + + + + Get or set how special floating point numbers, e.g. , + and , + are written to JSON text. + + + + + Get or set how and values are formatting when writing JSON text. + + + + + Gets or sets the culture used when writing JSON. Defaults to . + + + + + Initializes a new instance of the class. + + The stream. + + + + Initializes a new instance of the class. + + The writer. + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Writes the end. + + The token. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes raw JSON. + + The raw JSON to write. + + + + Writes raw JSON where a value is expected and updates the writer's state. + + The raw JSON to write. + + + + Writes the beginning of a JSON array. + + + + + Writes the beginning of a JSON object. + + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Closes this stream and the underlying stream. + + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value that represents a BSON object id. + + The Object ID value to write. + + + + Writes a BSON regex. + + The regex pattern. + The regex options. + + + + Gets or sets the used when writing values to BSON. + When set to no conversion will occur. + + The used when writing values to BSON. + + + + Specifies how constructors are used when initializing objects during deserialization by the . + + + + + First attempt to use the public default constructor, then fall back to single paramatized constructor, then the non-public default constructor. + + + + + Json.NET will use a non-public default constructor before falling back to a paramatized constructor. + + + + + Converts a to and from JSON and BSON. + + + + + Converts an object to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + + Gets the of the JSON produced by the JsonConverter. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The of the JSON produced by the JsonConverter. + + + + Gets a value indicating whether this can read JSON. + + true if this can read JSON; otherwise, false. + + + + Gets a value indicating whether this can write JSON. + + true if this can write JSON; otherwise, false. + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Create a custom object + + The object type to convert. + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Creates an object which will then be populated by the serializer. + + Type of the object. + The created object. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Gets a value indicating whether this can write JSON. + + + true if this can write JSON; otherwise, false. + + + + + Provides a base class for converting a to and from JSON. + + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts a F# discriminated union type to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts an ExpandoObject to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Gets a value indicating whether this can write JSON. + + + true if this can write JSON; otherwise, false. + + + + + Converts a to and from the ISO 8601 date format (e.g. 2008-04-12T12:53Z). + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Gets or sets the date time styles used when converting a date to and from JSON. + + The date time styles used when converting a date to and from JSON. + + + + Gets or sets the date time format used when converting a date to and from JSON. + + The date time format used when converting a date to and from JSON. + + + + Gets or sets the culture used when converting a date to and from JSON. + + The culture used when converting a date to and from JSON. + + + + Converts a to and from a JavaScript date constructor (e.g. new Date(52231943)). + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing property value of the JSON that is being converted. + The calling serializer. + The object value. + + + + Converts a to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts a to and from JSON and BSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts an to and from its name string value. + + + + + Initializes a new instance of the class. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Gets or sets a value indicating whether the written enum text should be camel case. + + true if the written enum text will be camel case; otherwise, false. + + + + Gets or sets a value indicating whether integer values are allowed. + + true if integers are allowed; otherwise, false. + + + + Converts a to and from a string (e.g. "1.2.3.4"). + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing property value of the JSON that is being converted. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts XML to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The calling serializer. + The value. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Checks if the attributeName is a namespace attribute. + + Attribute name to test. + The attribute name prefix if it has one, otherwise an empty string. + True if attribute name is for a namespace attribute, otherwise false. + + + + Determines whether this instance can convert the specified value type. + + Type of the value. + + true if this instance can convert the specified value type; otherwise, false. + + + + + Gets or sets the name of the root element to insert when deserializing to XML if the JSON structure has produces multiple root elements. + + The name of the deserialize root element. + + + + Gets or sets a flag to indicate whether to write the Json.NET array attribute. + This attribute helps preserve arrays when converting the written XML back to JSON. + + true if the array attibute is written to the XML; otherwise, false. + + + + Gets or sets a value indicating whether to write the root JSON object. + + true if the JSON root object is omitted; otherwise, false. + + + + Specifies how dates are formatted when writing JSON text. + + + + + Dates are written in the ISO 8601 format, e.g. "2012-03-21T05:40Z". + + + + + Dates are written in the Microsoft JSON format, e.g. "\/Date(1198908717056)\/". + + + + + Specifies how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON text. + + + + + Date formatted strings are not parsed to a date type and are read as strings. + + + + + Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . + + + + + Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . + + + + + Specifies how to treat the time value when converting between string and . + + + + + Treat as local time. If the object represents a Coordinated Universal Time (UTC), it is converted to the local time. + + + + + Treat as a UTC. If the object represents a local time, it is converted to a UTC. + + + + + Treat as a local time if a is being converted to a string. + If a string is being converted to , convert to a local time if a time zone is specified. + + + + + Time zone information should be preserved when converting. + + + + + Specifies default value handling options for the . + + + + + + + + + Include members where the member value is the same as the member's default value when serializing objects. + Included members are written to JSON. Has no effect when deserializing. + + + + + Ignore members where the member value is the same as the member's default value when serializing objects + so that is is not written to JSON. + This option will ignore all default values (e.g. null for objects and nullable types; 0 for integers, + decimals and floating point numbers; and false for booleans). The default value ignored can be changed by + placing the on the property. + + + + + Members with a default value but no JSON will be set to their default value when deserializing. + + + + + Ignore members where the member value is the same as the member's default value when serializing objects + and sets members to their default value when deserializing. + + + + + Specifies float format handling options when writing special floating point numbers, e.g. , + and with . + + + + + Write special floating point values as strings in JSON, e.g. "NaN", "Infinity", "-Infinity". + + + + + Write special floating point values as symbols in JSON, e.g. NaN, Infinity, -Infinity. + Note that this will produce non-valid JSON. + + + + + Write special floating point values as the property's default value in JSON, e.g. 0.0 for a property, null for a property. + + + + + Specifies how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Floating point numbers are parsed to . + + + + + Floating point numbers are parsed to . + + + + + Indicates the method that will be used during deserialization for locating and loading assemblies. + + + + + In simple mode, the assembly used during deserialization need not match exactly the assembly used during serialization. Specifically, the version numbers need not match as the LoadWithPartialName method is used to load the assembly. + + + + + In full mode, the assembly used during deserialization must match exactly the assembly used during serialization. The Load method of the Assembly class is used to load the assembly. + + + + + Specifies formatting options for the . + + + + + No special formatting is applied. This is the default. + + + + + Causes child objects to be indented according to the and settings. + + + + + Provides an interface to enable a class to return line and position information. + + + + + Gets a value indicating whether the class can return line information. + + + true if LineNumber and LinePosition can be provided; otherwise, false. + + + + + Gets the current line number. + + The current line number or 0 if no line information is available (for example, HasLineInfo returns false). + + + + Gets the current line position. + + The current line position or 0 if no line information is available (for example, HasLineInfo returns false). + + + + Instructs the how to serialize the collection. + + + + + Instructs the how to serialize the object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + Gets or sets the id. + + The id. + + + + Gets or sets the title. + + The title. + + + + Gets or sets the description. + + The description. + + + + Gets the collection's items converter. + + The collection's items converter. + + + + The parameter list to use when constructing the JsonConverter described by ItemConverterType. + If null, the default constructor is used. + When non-null, there must be a constructor defined in the JsonConverter that exactly matches the number, + order, and type of these parameters. + + + [JsonContainer(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })] + + + + + Gets or sets a value that indicates whether to preserve object references. + + + true to keep object reference; otherwise, false. The default is false. + + + + + Gets or sets a value that indicates whether to preserve collection's items references. + + + true to keep collection's items object references; otherwise, false. The default is false. + + + + + Gets or sets the reference loop handling used when serializing the collection's items. + + The reference loop handling. + + + + Gets or sets the type name handling used when serializing the collection's items. + + The type name handling. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with a flag indicating whether the array can contain null items + + A flag indicating whether the array can contain null items. + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + Gets or sets a value indicating whether null items are allowed in the collection. + + true if null items are allowed in the collection; otherwise, false. + + + + Instructs the to use the specified constructor when deserializing that object. + + + + + Provides methods for converting between common language runtime types and JSON types. + + + + + + + + Represents JavaScript's boolean value true as a string. This field is read-only. + + + + + Represents JavaScript's boolean value false as a string. This field is read-only. + + + + + Represents JavaScript's null as a string. This field is read-only. + + + + + Represents JavaScript's undefined as a string. This field is read-only. + + + + + Represents JavaScript's positive infinity as a string. This field is read-only. + + + + + Represents JavaScript's negative infinity as a string. This field is read-only. + + + + + Represents JavaScript's NaN as a string. This field is read-only. + + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation using the specified. + + The value to convert. + The format the date will be converted to. + The time zone handling when the date is converted to a string. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation using the specified. + + The value to convert. + The format the date will be converted to. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + The string delimiter character. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + The string delimiter character. + The string escape handling. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Serializes the specified object to a JSON string. + + The object to serialize. + A JSON string representation of the object. + + + + Serializes the specified object to a JSON string using formatting. + + The object to serialize. + Indicates how the output is formatted. + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using a collection of . + + The object to serialize. + A collection converters used while serializing. + A JSON string representation of the object. + + + + Serializes the specified object to a JSON string using formatting and a collection of . + + The object to serialize. + Indicates how the output is formatted. + A collection converters used while serializing. + A JSON string representation of the object. + + + + Serializes the specified object to a JSON string using . + + The object to serialize. + The used to serialize the object. + If this is null, default serialization settings will be used. + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using a type, formatting and . + + The object to serialize. + The used to serialize the object. + If this is null, default serialization settings will be used. + + The type of the value being serialized. + This parameter is used when is Auto to write out the type name if the type of the value does not match. + Specifing the type is optional. + + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using formatting and . + + The object to serialize. + Indicates how the output is formatted. + The used to serialize the object. + If this is null, default serialization settings will be used. + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using a type, formatting and . + + The object to serialize. + Indicates how the output is formatted. + The used to serialize the object. + If this is null, default serialization settings will be used. + + The type of the value being serialized. + This parameter is used when is Auto to write out the type name if the type of the value does not match. + Specifing the type is optional. + + + A JSON string representation of the object. + + + + + Asynchronously serializes the specified object to a JSON string. + Serialization will happen on a new thread. + + The object to serialize. + + A task that represents the asynchronous serialize operation. The value of the TResult parameter contains a JSON string representation of the object. + + + + + Asynchronously serializes the specified object to a JSON string using formatting. + Serialization will happen on a new thread. + + The object to serialize. + Indicates how the output is formatted. + + A task that represents the asynchronous serialize operation. The value of the TResult parameter contains a JSON string representation of the object. + + + + + Asynchronously serializes the specified object to a JSON string using formatting and a collection of . + Serialization will happen on a new thread. + + The object to serialize. + Indicates how the output is formatted. + The used to serialize the object. + If this is null, default serialization settings will be used. + + A task that represents the asynchronous serialize operation. The value of the TResult parameter contains a JSON string representation of the object. + + + + + Deserializes the JSON to a .NET object. + + The JSON to deserialize. + The deserialized object from the JSON string. + + + + Deserializes the JSON to a .NET object using . + + The JSON to deserialize. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type. + + The JSON to deserialize. + The of object being deserialized. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type. + + The type of the object to deserialize to. + The JSON to deserialize. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the given anonymous type. + + + The anonymous type to deserialize to. This can't be specified + traditionally and must be infered from the anonymous type passed + as a parameter. + + The JSON to deserialize. + The anonymous type object. + The deserialized anonymous type from the JSON string. + + + + Deserializes the JSON to the given anonymous type using . + + + The anonymous type to deserialize to. This can't be specified + traditionally and must be infered from the anonymous type passed + as a parameter. + + The JSON to deserialize. + The anonymous type object. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized anonymous type from the JSON string. + + + + Deserializes the JSON to the specified .NET type using a collection of . + + The type of the object to deserialize to. + The JSON to deserialize. + Converters to use while deserializing. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type using . + + The type of the object to deserialize to. + The object to deserialize. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type using a collection of . + + The JSON to deserialize. + The type of the object to deserialize. + Converters to use while deserializing. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type using . + + The JSON to deserialize. + The type of the object to deserialize to. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized object from the JSON string. + + + + Asynchronously deserializes the JSON to the specified .NET type. + Deserialization will happen on a new thread. + + The type of the object to deserialize to. + The JSON to deserialize. + + A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. + + + + + Asynchronously deserializes the JSON to the specified .NET type using . + Deserialization will happen on a new thread. + + The type of the object to deserialize to. + The JSON to deserialize. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + + A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. + + + + + Asynchronously deserializes the JSON to the specified .NET type. + Deserialization will happen on a new thread. + + The JSON to deserialize. + + A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. + + + + + Asynchronously deserializes the JSON to the specified .NET type using . + Deserialization will happen on a new thread. + + The JSON to deserialize. + The type of the object to deserialize to. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + + A task that represents the asynchronous deserialize operation. The value of the TResult parameter contains the deserialized object from the JSON string. + + + + + Populates the object with values from the JSON string. + + The JSON to populate values from. + The target object to populate values onto. + + + + Populates the object with values from the JSON string using . + + The JSON to populate values from. + The target object to populate values onto. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + + + + Asynchronously populates the object with values from the JSON string using . + + The JSON to populate values from. + The target object to populate values onto. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + + A task that represents the asynchronous populate operation. + + + + + Serializes the to a JSON string. + + The node to convert to JSON. + A JSON string of the XNode. + + + + Serializes the to a JSON string using formatting. + + The node to convert to JSON. + Indicates how the output is formatted. + A JSON string of the XNode. + + + + Serializes the to a JSON string using formatting and omits the root object if is true. + + The node to serialize. + Indicates how the output is formatted. + Omits writing the root object. + A JSON string of the XNode. + + + + Deserializes the from a JSON string. + + The JSON string. + The deserialized XNode + + + + Deserializes the from a JSON string nested in a root elment specified by . + + The JSON string. + The name of the root element to append when deserializing. + The deserialized XNode + + + + Deserializes the from a JSON string nested in a root elment specified by + and writes a .NET array attribute for collections. + + The JSON string. + The name of the root element to append when deserializing. + + A flag to indicate whether to write the Json.NET array attribute. + This attribute helps preserve arrays when converting the written XML back to JSON. + + The deserialized XNode + + + + Gets or sets a function that creates default . + Default settings are automatically used by serialization methods on , + and and on . + To serialize without using any default settings create a with + . + + + + + Instructs the to use the specified when serializing the member or class. + + + + + Initializes a new instance of the class. + + Type of the converter. + + + + Initializes a new instance of the class. + + Type of the converter. + Parameter list to use when constructing the JsonConverter. Can be null. + + + + Gets the of the converter. + + The of the converter. + + + + The parameter list to use when constructing the JsonConverter described by ConverterType. + If null, the default constructor is used. + + + + + Represents a collection of . + + + + + Instructs the how to serialize the collection. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + The exception thrown when an error occurs during JSON serialization or deserialization. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Instructs the to deserialize properties with no matching class member into the specified collection + and write values during serialization. + + + + + Initializes a new instance of the class. + + + + + Gets or sets a value that indicates whether to write extension data when serializing the object. + + + true to write extension data when serializing the object; otherwise, false. The default is true. + + + + + Gets or sets a value that indicates whether to read extension data when deserializing the object. + + + true to read extension data when deserializing the object; otherwise, false. The default is true. + + + + + Instructs the not to serialize the public field or public read/write property value. + + + + + Instructs the how to serialize the object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified member serialization. + + The member serialization. + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + Gets or sets the member serialization. + + The member serialization. + + + + Gets or sets a value that indicates whether the object's properties are required. + + + A value indicating whether the object's properties are required. + + + + + Instructs the to always serialize the member with the specified name. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified name. + + Name of the property. + + + + Gets or sets the converter used when serializing the property's collection items. + + The collection's items converter. + + + + The parameter list to use when constructing the JsonConverter described by ItemConverterType. + If null, the default constructor is used. + When non-null, there must be a constructor defined in the JsonConverter that exactly matches the number, + order, and type of these parameters. + + + [JsonProperty(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })] + + + + + Gets or sets the null value handling used when serializing this property. + + The null value handling. + + + + Gets or sets the default value handling used when serializing this property. + + The default value handling. + + + + Gets or sets the reference loop handling used when serializing this property. + + The reference loop handling. + + + + Gets or sets the object creation handling used when deserializing this property. + + The object creation handling. + + + + Gets or sets the type name handling used when serializing this property. + + The type name handling. + + + + Gets or sets whether this property's value is serialized as a reference. + + Whether this property's value is serialized as a reference. + + + + Gets or sets the order of serialization and deserialization of a member. + + The numeric order of serialization or deserialization. + + + + Gets or sets a value indicating whether this property is required. + + + A value indicating whether this property is required. + + + + + Gets or sets the name of the property. + + The name of the property. + + + + Gets or sets the the reference loop handling used when serializing the property's collection items. + + The collection's items reference loop handling. + + + + Gets or sets the the type name handling used when serializing the property's collection items. + + The collection's items type name handling. + + + + Gets or sets whether this property's collection items are serialized as a reference. + + Whether this property's collection items are serialized as a reference. + + + + The exception thrown when an error occurs while reading JSON text. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Gets the line number indicating where the error occurred. + + The line number indicating where the error occurred. + + + + Gets the line position indicating where the error occurred. + + The line position indicating where the error occurred. + + + + Gets the path to the JSON where the error occurred. + + The path to the JSON where the error occurred. + + + + Instructs the to always serialize the member, and require the member has a value. + + + + + The exception thrown when an error occurs during JSON serialization or deserialization. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Serializes and deserializes objects into and from the JSON format. + The enables you to control how objects are encoded into JSON. + + + + + Initializes a new instance of the class. + + + + + Creates a new instance. + The will not use default settings. + + + A new instance. + The will not use default settings. + + + + + Creates a new instance using the specified . + The will not use default settings. + + The settings to be applied to the . + + A new instance using the specified . + The will not use default settings. + + + + + Creates a new instance. + The will use default settings. + + + A new instance. + The will use default settings. + + + + + Creates a new instance using the specified . + The will use default settings. + + The settings to be applied to the . + + A new instance using the specified . + The will use default settings. + + + + + Populates the JSON values onto the target object. + + The that contains the JSON structure to reader values from. + The target object to populate values onto. + + + + Populates the JSON values onto the target object. + + The that contains the JSON structure to reader values from. + The target object to populate values onto. + + + + Deserializes the JSON structure contained by the specified . + + The that contains the JSON structure to deserialize. + The being deserialized. + + + + Deserializes the JSON structure contained by the specified + into an instance of the specified type. + + The containing the object. + The of object being deserialized. + The instance of being deserialized. + + + + Deserializes the JSON structure contained by the specified + into an instance of the specified type. + + The containing the object. + The type of the object to deserialize. + The instance of being deserialized. + + + + Deserializes the JSON structure contained by the specified + into an instance of the specified type. + + The containing the object. + The of object being deserialized. + The instance of being deserialized. + + + + Serializes the specified and writes the JSON structure + to a Stream using the specified . + + The used to write the JSON structure. + The to serialize. + + + + Serializes the specified and writes the JSON structure + to a Stream using the specified . + + The used to write the JSON structure. + The to serialize. + + The type of the value being serialized. + This parameter is used when is Auto to write out the type name if the type of the value does not match. + Specifing the type is optional. + + + + + Serializes the specified and writes the JSON structure + to a Stream using the specified . + + The used to write the JSON structure. + The to serialize. + + The type of the value being serialized. + This parameter is used when is Auto to write out the type name if the type of the value does not match. + Specifing the type is optional. + + + + + Serializes the specified and writes the JSON structure + to a Stream using the specified . + + The used to write the JSON structure. + The to serialize. + + + + Occurs when the errors during serialization and deserialization. + + + + + Gets or sets the used by the serializer when resolving references. + + + + + Gets or sets the used by the serializer when resolving type names. + + + + + Gets or sets the used by the serializer when writing trace messages. + + The trace writer. + + + + Gets or sets the equality comparer used by the serializer when comparing references. + + The equality comparer. + + + + Gets or sets how type name writing and reading is handled by the serializer. + + + + + Gets or sets how a type name assembly is written and resolved by the serializer. + + The type name assembly format. + + + + Gets or sets how object references are preserved by the serializer. + + + + + Get or set how reference loops (e.g. a class referencing itself) is handled. + + + + + Get or set how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. + + + + + Get or set how null values are handled during serialization and deserialization. + + + + + Get or set how null default are handled during serialization and deserialization. + + + + + Gets or sets how objects are created during deserialization. + + The object creation handling. + + + + Gets or sets how constructors are used during deserialization. + + The constructor handling. + + + + Gets or sets how metadata properties are used during deserialization. + + The metadata properties handling. + + + + Gets a collection that will be used during serialization. + + Collection that will be used during serialization. + + + + Gets or sets the contract resolver used by the serializer when + serializing .NET objects to JSON and vice versa. + + + + + Gets or sets the used by the serializer when invoking serialization callback methods. + + The context. + + + + Indicates how JSON text output is formatted. + + + + + Get or set how dates are written to JSON text. + + + + + Get or set how time zones are handling during serialization and deserialization. + + + + + Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. + + + + + Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Get or set how special floating point numbers, e.g. , + and , + are written as JSON text. + + + + + Get or set how strings are escaped when writing JSON text. + + + + + Get or set how and values are formatted when writing JSON text, and the expected date format when reading JSON text. + + + + + Gets or sets the culture used when reading JSON. Defaults to . + + + + + Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + + + + + Gets a value indicating whether there will be a check for additional JSON content after deserializing an object. + + + true if there will be a check for additional JSON content after deserializing an object; otherwise, false. + + + + + Specifies the settings on a object. + + + + + Initializes a new instance of the class. + + + + + Gets or sets how reference loops (e.g. a class referencing itself) is handled. + + Reference loop handling. + + + + Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. + + Missing member handling. + + + + Gets or sets how objects are created during deserialization. + + The object creation handling. + + + + Gets or sets how null values are handled during serialization and deserialization. + + Null value handling. + + + + Gets or sets how null default are handled during serialization and deserialization. + + The default value handling. + + + + Gets or sets a collection that will be used during serialization. + + The converters. + + + + Gets or sets how object references are preserved by the serializer. + + The preserve references handling. + + + + Gets or sets how type name writing and reading is handled by the serializer. + + The type name handling. + + + + Gets or sets how metadata properties are used during deserialization. + + The metadata properties handling. + + + + Gets or sets how a type name assembly is written and resolved by the serializer. + + The type name assembly format. + + + + Gets or sets how constructors are used during deserialization. + + The constructor handling. + + + + Gets or sets the contract resolver used by the serializer when + serializing .NET objects to JSON and vice versa. + + The contract resolver. + + + + Gets or sets the equality comparer used by the serializer when comparing references. + + The equality comparer. + + + + Gets or sets the used by the serializer when resolving references. + + The reference resolver. + + + + Gets or sets a function that creates the used by the serializer when resolving references. + + A function that creates the used by the serializer when resolving references. + + + + Gets or sets the used by the serializer when writing trace messages. + + The trace writer. + + + + Gets or sets the used by the serializer when resolving type names. + + The binder. + + + + Gets or sets the error handler called during serialization and deserialization. + + The error handler called during serialization and deserialization. + + + + Gets or sets the used by the serializer when invoking serialization callback methods. + + The context. + + + + Get or set how and values are formatted when writing JSON text, and the expected date format when reading JSON text. + + + + + Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + + + + + Indicates how JSON text output is formatted. + + + + + Get or set how dates are written to JSON text. + + + + + Get or set how time zones are handling during serialization and deserialization. + + + + + Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. + + + + + Get or set how special floating point numbers, e.g. , + and , + are written as JSON. + + + + + Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Get or set how strings are escaped when writing JSON text. + + + + + Gets or sets the culture used when reading JSON. Defaults to . + + + + + Gets a value indicating whether there will be a check for additional content after deserializing an object. + + + true if there will be a check for additional content after deserializing an object; otherwise, false. + + + + + Represents a reader that provides fast, non-cached, forward-only access to JSON text data. + + + + + Initializes a new instance of the class with the specified . + + The TextReader containing the XML data to read. + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Reads the next JSON token from the stream as a []. + + + A [] or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Changes the state to closed. + + + + + Gets a value indicating whether the class can return line information. + + + true if LineNumber and LinePosition can be provided; otherwise, false. + + + + + Gets the current line number. + + + The current line number or 0 if no line information is available (for example, HasLineInfo returns false). + + + + + Gets the current line position. + + + The current line position or 0 if no line information is available (for example, HasLineInfo returns false). + + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Creates an instance of the JsonWriter class using the specified . + + The TextWriter to write to. + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Closes this stream and the underlying stream. + + + + + Writes the beginning of a JSON object. + + + + + Writes the beginning of a JSON array. + + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes the specified end token. + + The end token to write. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + A flag to indicate whether the text should be escaped when it is written as a JSON property name. + + + + Writes indent characters. + + + + + Writes the JSON value delimiter. + + + + + Writes an indent space. + + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes raw JSON. + + The raw JSON to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes out the given white space. + + The string of white space characters. + + + + Gets or sets how many IndentChars to write for each level in the hierarchy when is set to Formatting.Indented. + + + + + Gets or sets which character to use to quote attribute values. + + + + + Gets or sets which character to use for indenting when is set to Formatting.Indented. + + + + + Gets or sets a value indicating whether object names will be surrounded with quotes. + + + + + Specifies the type of JSON token. + + + + + This is returned by the if a method has not been called. + + + + + An object start token. + + + + + An array start token. + + + + + A constructor start token. + + + + + An object property name. + + + + + A comment. + + + + + Raw JSON. + + + + + An integer. + + + + + A float. + + + + + A string. + + + + + A boolean. + + + + + A null token. + + + + + An undefined token. + + + + + An object end token. + + + + + An array end token. + + + + + A constructor end token. + + + + + A Date. + + + + + Byte data. + + + + + + Represents a reader that provides validation. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Initializes a new instance of the class that + validates the content returned from the given . + + The to read from while validating. + + + + Reads the next JSON token from the stream as a . + + A . + + + + Reads the next JSON token from the stream as a []. + + + A [] or a null reference if the next JSON token is null. + + + + + Reads the next JSON token from the stream as a . + + A . + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Sets an event handler for receiving schema validation errors. + + + + + Gets the text value of the current JSON token. + + + + + + Gets the depth of the current token in the JSON document. + + The depth of the current token in the JSON document. + + + + Gets the path of the current JSON token. + + + + + Gets the quotation mark character used to enclose the value of a string. + + + + + + Gets the type of the current JSON token. + + + + + + Gets the Common Language Runtime (CLR) type for the current JSON token. + + + + + + Gets or sets the schema. + + The schema. + + + + Gets the used to construct this . + + The specified in the constructor. + + + + The exception thrown when an error occurs while reading JSON text. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Gets the path to the JSON where the error occurred. + + The path to the JSON where the error occurred. + + + + Contains the LINQ to JSON extension methods. + + + + + Returns a collection of tokens that contains the ancestors of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains the ancestors of every token in the source collection. + + + + Returns a collection of tokens that contains every token in the source collection, and the ancestors of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains every token in the source collection, the ancestors of every token in the source collection. + + + + Returns a collection of tokens that contains the descendants of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains the descendants of every token in the source collection. + + + + Returns a collection of tokens that contains every token in the source collection, and the descendants of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains every token in the source collection, and the descendants of every token in the source collection. + + + + Returns a collection of child properties of every object in the source collection. + + An of that contains the source collection. + An of that contains the properties of every object in the source collection. + + + + Returns a collection of child values of every object in the source collection with the given key. + + An of that contains the source collection. + The token key. + An of that contains the values of every token in the source collection with the given key. + + + + Returns a collection of child values of every object in the source collection. + + An of that contains the source collection. + An of that contains the values of every token in the source collection. + + + + Returns a collection of converted child values of every object in the source collection with the given key. + + The type to convert the values to. + An of that contains the source collection. + The token key. + An that contains the converted values of every token in the source collection with the given key. + + + + Returns a collection of converted child values of every object in the source collection. + + The type to convert the values to. + An of that contains the source collection. + An that contains the converted values of every token in the source collection. + + + + Converts the value. + + The type to convert the value to. + A cast as a of . + A converted value. + + + + Converts the value. + + The source collection type. + The type to convert the value to. + A cast as a of . + A converted value. + + + + Returns a collection of child tokens of every array in the source collection. + + The source collection type. + An of that contains the source collection. + An of that contains the values of every token in the source collection. + + + + Returns a collection of converted child tokens of every array in the source collection. + + An of that contains the source collection. + The type to convert the values to. + The source collection type. + An that contains the converted values of every token in the source collection. + + + + Returns the input typed as . + + An of that contains the source collection. + The input typed as . + + + + Returns the input typed as . + + The source collection type. + An of that contains the source collection. + The input typed as . + + + + Represents a collection of objects. + + The type of token + + + + Gets the with the specified key. + + + + + + Represents a JSON array. + + + + + + + + Represents a token that can contain other tokens. + + + + + Represents an abstract JSON token. + + + + + Compares the values of two tokens, including the values of all descendant tokens. + + The first to compare. + The second to compare. + true if the tokens are equal; otherwise false. + + + + Adds the specified content immediately after this token. + + A content object that contains simple content or a collection of content objects to be added after this token. + + + + Adds the specified content immediately before this token. + + A content object that contains simple content or a collection of content objects to be added before this token. + + + + Returns a collection of the ancestor tokens of this token. + + A collection of the ancestor tokens of this token. + + + + Returns a collection of tokens that contain this token, and the ancestors of this token. + + A collection of tokens that contain this token, and the ancestors of this token. + + + + Returns a collection of the sibling tokens after this token, in document order. + + A collection of the sibling tokens after this tokens, in document order. + + + + Returns a collection of the sibling tokens before this token, in document order. + + A collection of the sibling tokens before this token, in document order. + + + + Gets the with the specified key converted to the specified type. + + The type to convert the token to. + The token key. + The converted token value. + + + + Returns a collection of the child tokens of this token, in document order. + + An of containing the child tokens of this , in document order. + + + + Returns a collection of the child tokens of this token, in document order, filtered by the specified type. + + The type to filter the child tokens on. + A containing the child tokens of this , in document order. + + + + Returns a collection of the child values of this token, in document order. + + The type to convert the values to. + A containing the child values of this , in document order. + + + + Removes this token from its parent. + + + + + Replaces this token with the specified token. + + The value. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Returns the indented JSON for this token. + + + The indented JSON for this token. + + + + + Returns the JSON for this token using the given formatting and converters. + + Indicates how the output is formatted. + A collection of which will be used when writing the token. + The JSON for this token using the given formatting and converters. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to []. + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from [] to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Creates an for this token. + + An that can be used to read this token and its descendants. + + + + Creates a from an object. + + The object that will be used to create . + A with the value of the specified object + + + + Creates a from an object using the specified . + + The object that will be used to create . + The that will be used when reading the object. + A with the value of the specified object + + + + Creates the specified .NET type from the . + + The object type that the token will be deserialized to. + The new object created from the JSON value. + + + + Creates the specified .NET type from the . + + The object type that the token will be deserialized to. + The new object created from the JSON value. + + + + Creates the specified .NET type from the using the specified . + + The object type that the token will be deserialized to. + The that will be used when creating the object. + The new object created from the JSON value. + + + + Creates the specified .NET type from the using the specified . + + The object type that the token will be deserialized to. + The that will be used when creating the object. + The new object created from the JSON value. + + + + Creates a from a . + + An positioned at the token to read into this . + + An that contains the token and its descendant tokens + that were read from the reader. The runtime type of the token is determined + by the token type of the first token encountered in the reader. + + + + + Load a from a string that contains JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + Creates a from a . + + An positioned at the token to read into this . + + An that contains the token and its descendant tokens + that were read from the reader. The runtime type of the token is determined + by the token type of the first token encountered in the reader. + + + + + Selects a using a JPath expression. Selects the token that matches the object path. + + + A that contains a JPath expression. + + A , or null. + + + + Selects a using a JPath expression. Selects the token that matches the object path. + + + A that contains a JPath expression. + + A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. + A . + + + + Selects a collection of elements using a JPath expression. + + + A that contains a JPath expression. + + An that contains the selected elements. + + + + Selects a collection of elements using a JPath expression. + + + A that contains a JPath expression. + + A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. + An that contains the selected elements. + + + + Returns the responsible for binding operations performed on this object. + + The expression tree representation of the runtime value. + + The to bind this object. + + + + + Returns the responsible for binding operations performed on this object. + + The expression tree representation of the runtime value. + + The to bind this object. + + + + + Creates a new instance of the . All child tokens are recursively cloned. + + A new instance of the . + + + + Adds an object to the annotation list of this . + + The annotation to add. + + + + Get the first annotation object of the specified type from this . + + The type of the annotation to retrieve. + The first annotation object that matches the specified type, or null if no annotation is of the specified type. + + + + Gets the first annotation object of the specified type from this . + + The of the annotation to retrieve. + The first annotation object that matches the specified type, or null if no annotation is of the specified type. + + + + Gets a collection of annotations of the specified type for this . + + The type of the annotations to retrieve. + An that contains the annotations for this . + + + + Gets a collection of annotations of the specified type for this . + + The of the annotations to retrieve. + An of that contains the annotations that match the specified type for this . + + + + Removes the annotations of the specified type from this . + + The type of annotations to remove. + + + + Removes the annotations of the specified type from this . + + The of annotations to remove. + + + + Gets a comparer that can compare two tokens for value equality. + + A that can compare two nodes for value equality. + + + + Gets or sets the parent. + + The parent. + + + + Gets the root of this . + + The root of this . + + + + Gets the node type for this . + + The type. + + + + Gets a value indicating whether this token has child tokens. + + + true if this token has child values; otherwise, false. + + + + + Gets the next sibling token of this node. + + The that contains the next sibling token. + + + + Gets the previous sibling token of this node. + + The that contains the previous sibling token. + + + + Gets the path of the JSON token. + + + + + Gets the with the specified key. + + The with the specified key. + + + + Get the first child token of this token. + + A containing the first child token of the . + + + + Get the last child token of this token. + + A containing the last child token of the . + + + + Raises the event. + + The instance containing the event data. + + + + Returns a collection of the child tokens of this token, in document order. + + + An of containing the child tokens of this , in document order. + + + + + Returns a collection of the child values of this token, in document order. + + The type to convert the values to. + + A containing the child values of this , in document order. + + + + + Returns a collection of the descendant tokens for this token in document order. + + An containing the descendant tokens of the . + + + + Returns a collection of the tokens that contain this token, and all descendant tokens of this token, in document order. + + An containing this token, and all the descendant tokens of the . + + + + Adds the specified content as children of this . + + The content to be added. + + + + Adds the specified content as the first children of this . + + The content to be added. + + + + Creates an that can be used to add tokens to the . + + An that is ready to have content written to it. + + + + Replaces the children nodes of this token with the specified content. + + The content. + + + + Removes the child nodes from this token. + + + + + Merge the specified content into this . + + The content to be merged. + + + + Merge the specified content into this using . + + The content to be merged. + The used to merge the content. + + + + Occurs when the items list of the collection has changed, or the collection is reset. + + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets a value indicating whether this token has child tokens. + + + true if this token has child values; otherwise, false. + + + + + Get the first child token of this token. + + + A containing the first child token of the . + + + + + Get the last child token of this token. + + + A containing the last child token of the . + + + + + Gets the count of child JSON tokens. + + The count of child JSON tokens + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the specified content. + + The contents of the array. + + + + Initializes a new instance of the class with the specified content. + + The contents of the array. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Load a from a string that contains JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + + + + Creates a from an object. + + The object that will be used to create . + A with the values of the specified object + + + + Creates a from an object. + + The object that will be used to create . + The that will be used to read the object. + A with the values of the specified object + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Inserts an item to the at the specified index. + + The zero-based index at which should be inserted. + The object to insert into the . + + is not a valid index in the . + The is read-only. + + + + Removes the item at the specified index. + + The zero-based index of the item to remove. + + is not a valid index in the . + The is read-only. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Adds an item to the . + + The object to add to the . + The is read-only. + + + + Removes all items from the . + + The is read-only. + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Copies to. + + The array. + Index of the array. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + The is read-only. + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets the node type for this . + + The type. + + + + Gets the with the specified key. + + The with the specified key. + + + + Gets or sets the at the specified index. + + + + + + Gets a value indicating whether the is read-only. + + true if the is read-only; otherwise, false. + + + + Represents a JSON constructor. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the specified name and content. + + The constructor name. + The contents of the constructor. + + + + Initializes a new instance of the class with the specified name and content. + + The constructor name. + The contents of the constructor. + + + + Initializes a new instance of the class with the specified name. + + The constructor name. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets or sets the name of this constructor. + + The constructor name. + + + + Gets the node type for this . + + The type. + + + + Gets the with the specified key. + + The with the specified key. + + + + Represents a collection of objects. + + The type of token + + + + An empty collection of objects. + + + + + Initializes a new instance of the struct. + + The enumerable. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Gets the with the specified key. + + + + + + Represents a JSON object. + + + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the specified content. + + The contents of the object. + + + + Initializes a new instance of the class with the specified content. + + The contents of the object. + + + + Gets an of this object's properties. + + An of this object's properties. + + + + Gets a the specified name. + + The property name. + A with the specified name or null. + + + + Gets an of this object's property values. + + An of this object's property values. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Load a from a string that contains JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + + + + Creates a from an object. + + The object that will be used to create . + A with the values of the specified object + + + + Creates a from an object. + + The object that will be used to create . + The that will be used to read the object. + A with the values of the specified object + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Gets the with the specified property name. + + Name of the property. + The with the specified property name. + + + + Gets the with the specified property name. + The exact property name will be searched for first and if no matching property is found then + the will be used to match a property. + + Name of the property. + One of the enumeration values that specifies how the strings will be compared. + The with the specified property name. + + + + Tries to get the with the specified property name. + The exact property name will be searched for first and if no matching property is found then + the will be used to match a property. + + Name of the property. + The value. + One of the enumeration values that specifies how the strings will be compared. + true if a value was successfully retrieved; otherwise, false. + + + + Adds the specified property name. + + Name of the property. + The value. + + + + Removes the property with the specified name. + + Name of the property. + true if item was successfully removed; otherwise, false. + + + + Tries the get value. + + Name of the property. + The value. + true if a value was successfully retrieved; otherwise, false. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Raises the event with the provided arguments. + + Name of the property. + + + + Returns the responsible for binding operations performed on this object. + + The expression tree representation of the runtime value. + + The to bind this object. + + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Occurs when a property value changes. + + + + + Gets the node type for this . + + The type. + + + + Gets the with the specified key. + + The with the specified key. + + + + Gets or sets the with the specified property name. + + + + + + Represents a JSON property. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class. + + The property name. + The property content. + + + + Initializes a new instance of the class. + + The property name. + The property content. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets the property name. + + The property name. + + + + Gets or sets the property value. + + The property value. + + + + Gets the node type for this . + + The type. + + + + Represents a raw JSON string. + + + + + Represents a value in JSON (string, integer, date, etc). + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Creates a comment with the given value. + + The value. + A comment with the given value. + + + + Creates a string with the given value. + + The value. + A string with the given value. + + + + Creates a null value. + + A null value. + + + + Creates a null value. + + A null value. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Indicates whether the current object is equal to another object of the same type. + + + true if the current object is equal to the parameter; otherwise, false. + + An object to compare with this object. + + + + Determines whether the specified is equal to the current . + + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + + The parameter is null. + + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The format. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The format provider. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The format. + The format provider. + + A that represents this instance. + + + + + Returns the responsible for binding operations performed on this object. + + The expression tree representation of the runtime value. + + The to bind this object. + + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings: + Value + Meaning + Less than zero + This instance is less than . + Zero + This instance is equal to . + Greater than zero + This instance is greater than . + + + is not the same type as this instance. + + + + + Gets a value indicating whether this token has child tokens. + + + true if this token has child values; otherwise, false. + + + + + Gets the node type for this . + + The type. + + + + Gets or sets the underlying token value. + + The underlying token value. + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class. + + The raw json. + + + + Creates an instance of with the content of the reader's current token. + + The reader. + An instance of with the content of the reader's current token. + + + + Specifies the settings used when merging JSON. + + + + + Gets or sets the method used when merging JSON arrays. + + The method used when merging JSON arrays. + + + + Compares tokens to determine whether they are equal. + + + + + Determines whether the specified objects are equal. + + The first object of type to compare. + The second object of type to compare. + + true if the specified objects are equal; otherwise, false. + + + + + Returns a hash code for the specified object. + + The for which a hash code is to be returned. + A hash code for the specified object. + The type of is a reference type and is null. + + + + Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. + + + + + Initializes a new instance of the class. + + The token to read from. + + + + Reads the next JSON token from the stream as a []. + + + A [] or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Gets the at the reader's current position. + + + + + Gets the path of the current JSON token. + + + + + Specifies the type of token. + + + + + No token type has been set. + + + + + A JSON object. + + + + + A JSON array. + + + + + A JSON constructor. + + + + + A JSON object property. + + + + + A comment. + + + + + An integer value. + + + + + A float value. + + + + + A string value. + + + + + A boolean value. + + + + + A null value. + + + + + An undefined value. + + + + + A date value. + + + + + A raw JSON value. + + + + + A collection of bytes value. + + + + + A Guid value. + + + + + A Uri value. + + + + + A TimeSpan value. + + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Initializes a new instance of the class writing to the given . + + The container being written to. + + + + Initializes a new instance of the class. + + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Closes this stream and the underlying stream. + + + + + Writes the beginning of a JSON object. + + + + + Writes the beginning of a JSON array. + + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes the end. + + The token. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes raw JSON. + + The raw JSON to write. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Gets the at the writer's current position. + + + + + Gets the token being writen. + + The token being writen. + + + + Specifies how JSON arrays are merged together. + + + + Concatenate arrays. + + + Union arrays, skipping items that already exist. + + + Replace all array items. + + + Merge array items together, matched by index. + + + + Specifies the member serialization options for the . + + + + + All public members are serialized by default. Members can be excluded using or . + This is the default member serialization mode. + + + + + Only members must be marked with or are serialized. + This member serialization mode can also be set by marking the class with . + + + + + All public and private fields are serialized. Members can be excluded using or . + This member serialization mode can also be set by marking the class with + and setting IgnoreSerializableAttribute on to false. + + + + + Specifies metadata property handling options for the . + + + + + Read metadata properties located at the start of a JSON object. + + + + + Read metadata properties located anywhere in a JSON object. Note that this setting will impact performance. + + + + + Do not try to read metadata properties. + + + + + Specifies missing member handling options for the . + + + + + Ignore a missing member and do not attempt to deserialize it. + + + + + Throw a when a missing member is encountered during deserialization. + + + + + Specifies null value handling options for the . + + + + + + + + + Include null values when serializing and deserializing objects. + + + + + Ignore null values when serializing and deserializing objects. + + + + + Specifies how object creation is handled by the . + + + + + Reuse existing objects, create new objects when needed. + + + + + Only reuse existing objects. + + + + + Always create new objects. + + + + + Specifies reference handling options for the . + Note that references cannot be preserved when a value is set via a non-default constructor such as types that implement ISerializable. + + + + + + + + Do not preserve references when serializing types. + + + + + Preserve references when serializing into a JSON object structure. + + + + + Preserve references when serializing into a JSON array structure. + + + + + Preserve references when serializing. + + + + + Specifies reference loop handling options for the . + + + + + Throw a when a loop is encountered. + + + + + Ignore loop references and do not serialize. + + + + + Serialize loop references. + + + + + Indicating whether a property is required. + + + + + The property is not required. The default state. + + + + + The property must be defined in JSON but can be a null value. + + + + + The property must be defined in JSON and cannot be a null value. + + + + + + Contains the JSON schema extension methods. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + + Determines whether the is valid. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + + true if the specified is valid; otherwise, false. + + + + + + Determines whether the is valid. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + When this method returns, contains any error messages generated while validating. + + true if the specified is valid; otherwise, false. + + + + + + Validates the specified . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + + + + + Validates the specified . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + The validation event handler. + + + + + An in-memory representation of a JSON Schema. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Initializes a new instance of the class. + + + + + Reads a from the specified . + + The containing the JSON Schema to read. + The object representing the JSON Schema. + + + + Reads a from the specified . + + The containing the JSON Schema to read. + The to use when resolving schema references. + The object representing the JSON Schema. + + + + Load a from a string that contains schema JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + Parses the specified json. + + The json. + The resolver. + A populated from the string that contains JSON. + + + + Writes this schema to a . + + A into which this method will write. + + + + Writes this schema to a using the specified . + + A into which this method will write. + The resolver used. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets or sets the id. + + + + + Gets or sets the title. + + + + + Gets or sets whether the object is required. + + + + + Gets or sets whether the object is read only. + + + + + Gets or sets whether the object is visible to users. + + + + + Gets or sets whether the object is transient. + + + + + Gets or sets the description of the object. + + + + + Gets or sets the types of values allowed by the object. + + The type. + + + + Gets or sets the pattern. + + The pattern. + + + + Gets or sets the minimum length. + + The minimum length. + + + + Gets or sets the maximum length. + + The maximum length. + + + + Gets or sets a number that the value should be divisble by. + + A number that the value should be divisble by. + + + + Gets or sets the minimum. + + The minimum. + + + + Gets or sets the maximum. + + The maximum. + + + + Gets or sets a flag indicating whether the value can not equal the number defined by the "minimum" attribute. + + A flag indicating whether the value can not equal the number defined by the "minimum" attribute. + + + + Gets or sets a flag indicating whether the value can not equal the number defined by the "maximum" attribute. + + A flag indicating whether the value can not equal the number defined by the "maximum" attribute. + + + + Gets or sets the minimum number of items. + + The minimum number of items. + + + + Gets or sets the maximum number of items. + + The maximum number of items. + + + + Gets or sets the of items. + + The of items. + + + + Gets or sets a value indicating whether items in an array are validated using the instance at their array position from . + + + true if items are validated using their array position; otherwise, false. + + + + + Gets or sets the of additional items. + + The of additional items. + + + + Gets or sets a value indicating whether additional items are allowed. + + + true if additional items are allowed; otherwise, false. + + + + + Gets or sets whether the array items must be unique. + + + + + Gets or sets the of properties. + + The of properties. + + + + Gets or sets the of additional properties. + + The of additional properties. + + + + Gets or sets the pattern properties. + + The pattern properties. + + + + Gets or sets a value indicating whether additional properties are allowed. + + + true if additional properties are allowed; otherwise, false. + + + + + Gets or sets the required property if this property is present. + + The required property if this property is present. + + + + Gets or sets the a collection of valid enum values allowed. + + A collection of valid enum values allowed. + + + + Gets or sets disallowed types. + + The disallow types. + + + + Gets or sets the default value. + + The default value. + + + + Gets or sets the collection of that this schema extends. + + The collection of that this schema extends. + + + + Gets or sets the format. + + The format. + + + + + Returns detailed information about the schema exception. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Gets the line number indicating where the error occurred. + + The line number indicating where the error occurred. + + + + Gets the line position indicating where the error occurred. + + The line position indicating where the error occurred. + + + + Gets the path to the JSON where the error occurred. + + The path to the JSON where the error occurred. + + + + + Generates a from a specified . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Generate a from the specified type. + + The type to generate a from. + A generated from the specified type. + + + + Generate a from the specified type. + + The type to generate a from. + The used to resolve schema references. + A generated from the specified type. + + + + Generate a from the specified type. + + The type to generate a from. + Specify whether the generated root will be nullable. + A generated from the specified type. + + + + Generate a from the specified type. + + The type to generate a from. + The used to resolve schema references. + Specify whether the generated root will be nullable. + A generated from the specified type. + + + + Gets or sets how undefined schemas are handled by the serializer. + + + + + Gets or sets the contract resolver. + + The contract resolver. + + + + + Resolves from an id. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Initializes a new instance of the class. + + + + + Gets a for the specified reference. + + The id. + A for the specified reference. + + + + Gets or sets the loaded schemas. + + The loaded schemas. + + + + + The value types allowed by the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + No type specified. + + + + + String type. + + + + + Float type. + + + + + Integer type. + + + + + Boolean type. + + + + + Object type. + + + + + Array type. + + + + + Null type. + + + + + Any type. + + + + + + Specifies undefined schema Id handling options for the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Do not infer a schema Id. + + + + + Use the .NET type name as the schema Id. + + + + + Use the assembly qualified .NET type name as the schema Id. + + + + + + Returns detailed information related to the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Gets the associated with the validation error. + + The JsonSchemaException associated with the validation error. + + + + Gets the path of the JSON location where the validation error occurred. + + The path of the JSON location where the validation error occurred. + + + + Gets the text description corresponding to the validation error. + + The text description. + + + + + Represents the callback method that will handle JSON schema validation events and the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Allows users to control class loading and mandate what class to load. + + + + + When overridden in a derived class, controls the binding of a serialized object to a type. + + Specifies the name of the serialized object. + Specifies the name of the serialized object + The type of the object the formatter creates a new instance of. + + + + When overridden in a derived class, controls the binding of a serialized object to a type. + + The type of the object the formatter creates a new instance of. + Specifies the name of the serialized object. + Specifies the name of the serialized object. + + + + Resolves member mappings for a type, camel casing property names. + + + + + Used by to resolves a for a given . + + + + + Used by to resolves a for a given . + + + + + + + + + Resolves the contract for a given type. + + The type to resolve a contract for. + The contract for a given type. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + If set to true the will use a cached shared with other resolvers of the same type. + Sharing the cache will significantly improve performance with multiple resolver instances because expensive reflection will only + happen once. This setting can cause unexpected behavior if different instances of the resolver are suppose to produce different + results. When set to false it is highly recommended to reuse instances with the . + + + + + Resolves the contract for a given type. + + The type to resolve a contract for. + The contract for a given type. + + + + Gets the serializable members for the type. + + The type to get serializable members for. + The serializable members for the type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates the constructor parameters. + + The constructor to create properties for. + The type's member properties. + Properties for the given . + + + + Creates a for the given . + + The matching member property. + The constructor parameter. + A created for the given . + + + + Resolves the default for the contract. + + Type of the object. + The contract's default . + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Determines which contract type is created for the given type. + + Type of the object. + A for the given type. + + + + Creates properties for the given . + + The type to create properties for. + /// The member serialization mode for the type. + Properties for the given . + + + + Creates the used by the serializer to get and set values from a member. + + The member. + The used by the serializer to get and set values from a member. + + + + Creates a for the given . + + The member's parent . + The member to create a for. + A created for the given . + + + + Resolves the name of the property. + + Name of the property. + Resolved name of the property. + + + + Resolves the key of the dictionary. By default is used to resolve dictionary keys. + + Key of the dictionary. + Resolved key of the dictionary. + + + + Gets the resolved name of the property. + + Name of the property. + Name of the property. + + + + Gets a value indicating whether members are being get and set using dynamic code generation. + This value is determined by the runtime permissions available. + + + true if using dynamic code generation; otherwise, false. + + + + + Gets or sets a value indicating whether compiler generated members should be serialized. + + + true if serialized compiler generated members; otherwise, false. + + + + + Initializes a new instance of the class. + + + + + Resolves the name of the property. + + Name of the property. + The property name camel cased. + + + + Get and set values for a using dynamic methods. + + + + + Provides methods to get and set values. + + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + Initializes a new instance of the class. + + The member info. + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + Used to resolve references when serializing and deserializing JSON by the . + + + + + Resolves a reference to its object. + + The serialization context. + The reference to resolve. + The object that + + + + Gets the reference for the sepecified object. + + The serialization context. + The object to get a reference for. + The reference to the object. + + + + Determines whether the specified object is referenced. + + The serialization context. + The object to test for a reference. + + true if the specified object is referenced; otherwise, false. + + + + + Adds a reference to the specified object. + + The serialization context. + The reference. + The object to reference. + + + + The default serialization binder used when resolving and loading classes from type names. + + + + + When overridden in a derived class, controls the binding of a serialized object to a type. + + Specifies the name of the serialized object. + Specifies the name of the serialized object. + + The type of the object the formatter creates a new instance of. + + + + + When overridden in a derived class, controls the binding of a serialized object to a type. + + The type of the object the formatter creates a new instance of. + Specifies the name of the serialized object. + Specifies the name of the serialized object. + + + + Provides information surrounding an error. + + + + + Gets the error. + + The error. + + + + Gets the original object that caused the error. + + The original object that caused the error. + + + + Gets the member that caused the error. + + The member that caused the error. + + + + Gets the path of the JSON location where the error occurred. + + The path of the JSON location where the error occurred. + + + + Gets or sets a value indicating whether this is handled. + + true if handled; otherwise, false. + + + + Provides data for the Error event. + + + + + Initializes a new instance of the class. + + The current object. + The error context. + + + + Gets the current object the error event is being raised against. + + The current object the error event is being raised against. + + + + Gets the error context. + + The error context. + + + + Provides methods to get attributes. + + + + + Returns a collection of all of the attributes, or an empty collection if there are no attributes. + + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Returns a collection of attributes, identified by type, or an empty collection if there are no attributes. + + The type of the attributes. + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Represents a trace writer. + + + + + Writes the specified trace level, message and optional exception. + + The at which to write this trace. + The trace message. + The trace exception. This parameter is optional. + + + + Gets the that will be used to filter the trace messages passed to the writer. + For example a filter level of Info will exclude Verbose messages and include Info, + Warning and Error messages. + + The that will be used to filter the trace messages passed to the writer. + + + + Contract details for a used by the . + + + + + Contract details for a used by the . + + + + + Contract details for a used by the . + + + + + Gets the underlying type for the contract. + + The underlying type for the contract. + + + + Gets or sets the type created during deserialization. + + The type created during deserialization. + + + + Gets or sets whether this type contract is serialized as a reference. + + Whether this type contract is serialized as a reference. + + + + Gets or sets the default for this contract. + + The converter. + + + + Gets or sets all methods called immediately after deserialization of the object. + + The methods called immediately after deserialization of the object. + + + + Gets or sets all methods called during deserialization of the object. + + The methods called during deserialization of the object. + + + + Gets or sets all methods called after serialization of the object graph. + + The methods called after serialization of the object graph. + + + + Gets or sets all methods called before serialization of the object. + + The methods called before serialization of the object. + + + + Gets or sets all method called when an error is thrown during the serialization of the object. + + The methods called when an error is thrown during the serialization of the object. + + + + Gets or sets the method called immediately after deserialization of the object. + + The method called immediately after deserialization of the object. + + + + Gets or sets the method called during deserialization of the object. + + The method called during deserialization of the object. + + + + Gets or sets the method called after serialization of the object graph. + + The method called after serialization of the object graph. + + + + Gets or sets the method called before serialization of the object. + + The method called before serialization of the object. + + + + Gets or sets the method called when an error is thrown during the serialization of the object. + + The method called when an error is thrown during the serialization of the object. + + + + Gets or sets the default creator method used to create the object. + + The default creator method used to create the object. + + + + Gets or sets a value indicating whether the default creator is non public. + + true if the default object creator is non-public; otherwise, false. + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets or sets the default collection items . + + The converter. + + + + Gets or sets a value indicating whether the collection items preserve object references. + + true if collection items preserve object references; otherwise, false. + + + + Gets or sets the collection item reference loop handling. + + The reference loop handling. + + + + Gets or sets the collection item type name handling. + + The type name handling. + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets the of the collection items. + + The of the collection items. + + + + Gets a value indicating whether the collection type is a multidimensional array. + + true if the collection type is a multidimensional array; otherwise, false. + + + + Handles serialization callback events. + + The object that raised the callback event. + The streaming context. + + + + Handles serialization error callback events. + + The object that raised the callback event. + The streaming context. + The error context. + + + + Sets extension data for an object during deserialization. + + The object to set extension data on. + The extension data key. + The extension data value. + + + + Gets extension data for an object during serialization. + + The object to set extension data on. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets or sets the property name resolver. + + The property name resolver. + + + + Gets or sets the dictionary key resolver. + + The dictionary key resolver. + + + + Gets the of the dictionary keys. + + The of the dictionary keys. + + + + Gets the of the dictionary values. + + The of the dictionary values. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets the object's properties. + + The object's properties. + + + + Gets or sets the property name resolver. + + The property name resolver. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets or sets the object member serialization. + + The member object serialization. + + + + Gets or sets a value that indicates whether the object's properties are required. + + + A value indicating whether the object's properties are required. + + + + + Gets the object's properties. + + The object's properties. + + + + Gets the constructor parameters required for any non-default constructor + + + + + Gets a collection of instances that define the parameters used with . + + + + + Gets or sets the override constructor used to create the object. + This is set when a constructor is marked up using the + JsonConstructor attribute. + + The override constructor. + + + + Gets or sets the parametrized constructor used to create the object. + + The parametrized constructor. + + + + Gets or sets the function used to create the object. When set this function will override . + This function is called with a collection of arguments which are defined by the collection. + + The function used to create the object. + + + + Gets or sets the extension data setter. + + + + + Gets or sets the extension data getter. + + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Maps a JSON property to a .NET member or constructor parameter. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets or sets the name of the property. + + The name of the property. + + + + Gets or sets the type that declared this property. + + The type that declared this property. + + + + Gets or sets the order of serialization and deserialization of a member. + + The numeric order of serialization or deserialization. + + + + Gets or sets the name of the underlying member or parameter. + + The name of the underlying member or parameter. + + + + Gets the that will get and set the during serialization. + + The that will get and set the during serialization. + + + + Gets or sets the for this property. + + The for this property. + + + + Gets or sets the type of the property. + + The type of the property. + + + + Gets or sets the for the property. + If set this converter takes presidence over the contract converter for the property type. + + The converter. + + + + Gets or sets the member converter. + + The member converter. + + + + Gets or sets a value indicating whether this is ignored. + + true if ignored; otherwise, false. + + + + Gets or sets a value indicating whether this is readable. + + true if readable; otherwise, false. + + + + Gets or sets a value indicating whether this is writable. + + true if writable; otherwise, false. + + + + Gets or sets a value indicating whether this has a member attribute. + + true if has a member attribute; otherwise, false. + + + + Gets the default value. + + The default value. + + + + Gets or sets a value indicating whether this is required. + + A value indicating whether this is required. + + + + Gets or sets a value indicating whether this property preserves object references. + + + true if this instance is reference; otherwise, false. + + + + + Gets or sets the property null value handling. + + The null value handling. + + + + Gets or sets the property default value handling. + + The default value handling. + + + + Gets or sets the property reference loop handling. + + The reference loop handling. + + + + Gets or sets the property object creation handling. + + The object creation handling. + + + + Gets or sets or sets the type name handling. + + The type name handling. + + + + Gets or sets a predicate used to determine whether the property should be serialize. + + A predicate used to determine whether the property should be serialize. + + + + Gets or sets a predicate used to determine whether the property should be serialized. + + A predicate used to determine whether the property should be serialized. + + + + Gets or sets an action used to set whether the property has been deserialized. + + An action used to set whether the property has been deserialized. + + + + Gets or sets the converter used when serializing the property's collection items. + + The collection's items converter. + + + + Gets or sets whether this property's collection items are serialized as a reference. + + Whether this property's collection items are serialized as a reference. + + + + Gets or sets the the type name handling used when serializing the property's collection items. + + The collection's items type name handling. + + + + Gets or sets the the reference loop handling used when serializing the property's collection items. + + The collection's items reference loop handling. + + + + A collection of objects. + + + + + Initializes a new instance of the class. + + The type. + + + + When implemented in a derived class, extracts the key from the specified element. + + The element from which to extract the key. + The key for the specified element. + + + + Adds a object. + + The property to add to the collection. + + + + Gets the closest matching object. + First attempts to get an exact case match of propertyName and then + a case insensitive match. + + Name of the property. + A matching property if found. + + + + Gets a property by property name. + + The name of the property to get. + Type property name string comparison. + A matching property if found. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Lookup and create an instance of the JsonConverter type described by the argument. + + The JsonConverter type to create. + Optional arguments to pass to an initializing constructor of the JsonConverter. + If null, the default constructor is used. + + + + Create a factory function that can be used to create instances of a JsonConverter described by the + argument type. The returned function can then be used to either invoke the converter's default ctor, or any + parameterized constructors by way of an object array. + + + + + Represents a trace writer that writes to memory. When the trace message limit is + reached then old trace messages will be removed as new messages are added. + + + + + Initializes a new instance of the class. + + + + + Writes the specified trace level, message and optional exception. + + The at which to write this trace. + The trace message. + The trace exception. This parameter is optional. + + + + Returns an enumeration of the most recent trace messages. + + An enumeration of the most recent trace messages. + + + + Returns a of the most recent trace messages. + + + A of the most recent trace messages. + + + + + Gets the that will be used to filter the trace messages passed to the writer. + For example a filter level of Info will exclude Verbose messages and include Info, + Warning and Error messages. + + + The that will be used to filter the trace messages passed to the writer. + + + + + Represents a method that constructs an object. + + The object type to create. + + + + When applied to a method, specifies that the method is called when an error occurs serializing an object. + + + + + Provides methods to get attributes from a , , or . + + + + + Initializes a new instance of the class. + + The instance to get attributes for. This parameter should be a , , or . + + + + Returns a collection of all of the attributes, or an empty collection if there are no attributes. + + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Returns a collection of attributes, identified by type, or an empty collection if there are no attributes. + + The type of the attributes. + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Get and set values for a using reflection. + + + + + Initializes a new instance of the class. + + The member info. + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + Specifies how strings are escaped when writing JSON text. + + + + + Only control characters (e.g. newline) are escaped. + + + + + All non-ASCII and control characters (e.g. newline) are escaped. + + + + + HTML (<, >, &, ', ") and control characters (e.g. newline) are escaped. + + + + + Specifies what messages to output for the class. + + + + + Output no tracing and debugging messages. + + + + + Output error-handling messages. + + + + + Output warnings and error-handling messages. + + + + + Output informational messages, warnings, and error-handling messages. + + + + + Output all debugging and tracing messages. + + + + + Specifies type name handling options for the . + + + + + Do not include the .NET type name when serializing types. + + + + + Include the .NET type name when serializing into a JSON object structure. + + + + + Include the .NET type name when serializing into a JSON array structure. + + + + + Always include the .NET type name when serializing. + + + + + Include the .NET type name when the type of the object being serialized is not the same as its declared type. + + + + + Determines whether the collection is null or empty. + + The collection. + + true if the collection is null or empty; otherwise, false. + + + + + Adds the elements of the specified collection to the specified generic IList. + + The list to add to. + The collection of elements to add. + + + + Returns the index of the first occurrence in a sequence by using a specified IEqualityComparer{TSource}. + + The type of the elements of source. + A sequence in which to locate a value. + The object to locate in the sequence + An equality comparer to compare values. + The zero-based index of the first occurrence of value within the entire sequence, if found; otherwise, –1. + + + + Converts the value to the specified type. If the value is unable to be converted, the + value is checked whether it assignable to the specified type. + + The value to convert. + The culture to use when converting. + The type to convert or cast the value to. + + The converted type. If conversion was unsuccessful, the initial value + is returned if assignable to the target type. + + + + + Helper method for generating a MetaObject which calls a + specific method on Dynamic that returns a result + + + + + Helper method for generating a MetaObject which calls a + specific method on Dynamic, but uses one of the arguments for + the result. + + + + + Helper method for generating a MetaObject which calls a + specific method on Dynamic, but uses one of the arguments for + the result. + + + + + Returns a Restrictions object which includes our current restrictions merged + with a restriction limiting our type + + + + + Gets a dictionary of the names and values of an Enum type. + + + + + + Gets a dictionary of the names and values of an Enum type. + + The enum type to get names and values for. + + + + + Gets the type of the typed collection's items. + + The type. + The type of the typed collection's items. + + + + Gets the member's underlying type. + + The member. + The underlying type of the member. + + + + Determines whether the member is an indexed property. + + The member. + + true if the member is an indexed property; otherwise, false. + + + + + Determines whether the property is an indexed property. + + The property. + + true if the property is an indexed property; otherwise, false. + + + + + Gets the member's value on the object. + + The member. + The target object. + The member's value on the object. + + + + Sets the member's value on the target object. + + The member. + The target. + The value. + + + + Determines whether the specified MemberInfo can be read. + + The MemberInfo to determine whether can be read. + /// if set to true then allow the member to be gotten non-publicly. + + true if the specified MemberInfo can be read; otherwise, false. + + + + + Determines whether the specified MemberInfo can be set. + + The MemberInfo to determine whether can be set. + if set to true then allow the member to be set non-publicly. + if set to true then allow the member to be set if read-only. + + true if the specified MemberInfo can be set; otherwise, false. + + + + + Builds a string. Unlike StringBuilder this class lets you reuse it's internal buffer. + + + + + Determines whether the string is all white space. Empty string will return false. + + The string to test whether it is all white space. + + true if the string is all white space; otherwise, false. + + + + + Nulls an empty string. + + The string. + Null if the string was null, otherwise the string unchanged. + + + + Specifies the state of the . + + + + + An exception has been thrown, which has left the in an invalid state. + You may call the method to put the in the Closed state. + Any other method calls results in an being thrown. + + + + + The method has been called. + + + + + An object is being written. + + + + + A array is being written. + + + + + A constructor is being written. + + + + + A property is being written. + + + + + A write method has not been called. + + + + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Portable40/Newtonsoft.Json.dll b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Portable40/Newtonsoft.Json.dll new file mode 100644 index 00000000..f2e197e9 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Portable40/Newtonsoft.Json.dll differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Portable40/Newtonsoft.Json.pdb b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Portable40/Newtonsoft.Json.pdb new file mode 100644 index 00000000..4a763be3 Binary files /dev/null and b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Portable40/Newtonsoft.Json.pdb differ diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Portable40/Newtonsoft.Json.xml b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Portable40/Newtonsoft.Json.xml new file mode 100644 index 00000000..89a411fb --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/bin/Json70r1/Portable40/Newtonsoft.Json.xml @@ -0,0 +1,8067 @@ + + + + Newtonsoft.Json + + + + + Represents a BSON Oid (object id). + + + + + Initializes a new instance of the class. + + The Oid value. + + + + Gets or sets the value of the Oid. + + The value of the Oid. + + + + Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. + + + + + Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. + + + + + Initializes a new instance of the class with the specified . + + + + + Reads the next JSON token from the stream. + + true if the next token was read successfully; false if there are no more tokens to read. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a []. + + A [] or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Skips the children of the current token. + + + + + Sets the current token. + + The new token. + + + + Sets the current token and value. + + The new token. + The value. + + + + Sets the state based on current token type. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Releases unmanaged and - optionally - managed resources + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Changes the to Closed. + + + + + Gets the current reader state. + + The current reader state. + + + + Gets or sets a value indicating whether the underlying stream or + should be closed when the reader is closed. + + + true to close the underlying stream or when + the reader is closed; otherwise false. The default is true. + + + + + Gets or sets a value indicating whether multiple pieces of JSON content can + be read from a continuous stream without erroring. + + + true to support reading multiple pieces of JSON content; otherwise false. The default is false. + + + + + Gets the quotation mark character used to enclose the value of a string. + + + + + Get or set how time zones are handling when reading JSON. + + + + + Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. + + + + + Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Get or set how custom date formatted strings are parsed when reading JSON. + + + + + Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + + + + + Gets the type of the current JSON token. + + + + + Gets the text value of the current JSON token. + + + + + Gets The Common Language Runtime (CLR) type for the current JSON token. + + + + + Gets the depth of the current token in the JSON document. + + The depth of the current token in the JSON document. + + + + Gets the path of the current JSON token. + + + + + Gets or sets the culture used when reading JSON. Defaults to . + + + + + Specifies the state of the reader. + + + + + The Read method has not been called. + + + + + The end of the file has been reached successfully. + + + + + Reader is at a property. + + + + + Reader is at the start of an object. + + + + + Reader is in an object. + + + + + Reader is at the start of an array. + + + + + Reader is in an array. + + + + + The Close method has been called. + + + + + Reader has just read a value. + + + + + Reader is at the start of a constructor. + + + + + Reader in a constructor. + + + + + An error occurred that prevents the read operation from continuing. + + + + + The end of the file has been reached successfully. + + + + + Initializes a new instance of the class. + + The stream. + + + + Initializes a new instance of the class. + + The reader. + + + + Initializes a new instance of the class. + + The stream. + if set to true the root object will be read as a JSON array. + The used when reading values from BSON. + + + + Initializes a new instance of the class. + + The reader. + if set to true the root object will be read as a JSON array. + The used when reading values from BSON. + + + + Reads the next JSON token from the stream as a []. + + + A [] or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + + A . This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Changes the to Closed. + + + + + Gets or sets a value indicating whether binary data reading should compatible with incorrect Json.NET 3.5 written binary. + + + true if binary data reading will be compatible with incorrect Json.NET 3.5 written binary; otherwise, false. + + + + + Gets or sets a value indicating whether the root object will be read as a JSON array. + + + true if the root object will be read as a JSON array; otherwise, false. + + + + + Gets or sets the used when reading values from BSON. + + The used when reading values from BSON. + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Creates an instance of the JsonWriter class. + + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Closes this stream and the underlying stream. + + + + + Writes the beginning of a JSON object. + + + + + Writes the end of a JSON object. + + + + + Writes the beginning of a JSON array. + + + + + Writes the end of an array. + + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes the end constructor. + + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + A flag to indicate whether the text should be escaped when it is written as a JSON property name. + + + + Writes the end of the current JSON object or array. + + + + + Writes the current token and its children. + + The to read the token from. + + + + Writes the current token. + + The to read the token from. + A flag indicating whether the current token's children should be written. + + + + Writes the token and its value. + + The to write. + + The value to write. + A value is only required for tokens that have an associated value, e.g. the property name for . + A null value can be passed to the method for token's that don't have a value, e.g. . + + + + Writes the token. + + The to write. + + + + Writes the specified end token. + + The end token to write. + + + + Writes indent characters. + + + + + Writes the JSON value delimiter. + + + + + Writes an indent space. + + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes raw JSON without changing the writer's state. + + The raw JSON to write. + + + + Writes raw JSON where a value is expected and updates the writer's state. + + The raw JSON to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes out the given white space. + + The string of white space characters. + + + + Sets the state of the JsonWriter, + + The JsonToken being written. + The value being written. + + + + Gets or sets a value indicating whether the underlying stream or + should be closed when the writer is closed. + + + true to close the underlying stream or when + the writer is closed; otherwise false. The default is true. + + + + + Gets the top. + + The top. + + + + Gets the state of the writer. + + + + + Gets the path of the writer. + + + + + Indicates how JSON text output is formatted. + + + + + Get or set how dates are written to JSON text. + + + + + Get or set how time zones are handling when writing JSON text. + + + + + Get or set how strings are escaped when writing JSON text. + + + + + Get or set how special floating point numbers, e.g. , + and , + are written to JSON text. + + + + + Get or set how and values are formatting when writing JSON text. + + + + + Gets or sets the culture used when writing JSON. Defaults to . + + + + + Initializes a new instance of the class. + + The stream. + + + + Initializes a new instance of the class. + + The writer. + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Writes the end. + + The token. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes raw JSON. + + The raw JSON to write. + + + + Writes raw JSON where a value is expected and updates the writer's state. + + The raw JSON to write. + + + + Writes the beginning of a JSON array. + + + + + Writes the beginning of a JSON object. + + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Closes this stream and the underlying stream. + + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value that represents a BSON object id. + + The Object ID value to write. + + + + Writes a BSON regex. + + The regex pattern. + The regex options. + + + + Gets or sets the used when writing values to BSON. + When set to no conversion will occur. + + The used when writing values to BSON. + + + + Specifies how constructors are used when initializing objects during deserialization by the . + + + + + First attempt to use the public default constructor, then fall back to single paramatized constructor, then the non-public default constructor. + + + + + Json.NET will use a non-public default constructor before falling back to a paramatized constructor. + + + + + Converts a to and from JSON and BSON. + + + + + Converts an object to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + + Gets the of the JSON produced by the JsonConverter. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The of the JSON produced by the JsonConverter. + + + + Gets a value indicating whether this can read JSON. + + true if this can read JSON; otherwise, false. + + + + Gets a value indicating whether this can write JSON. + + true if this can write JSON; otherwise, false. + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Create a custom object + + The object type to convert. + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Creates an object which will then be populated by the serializer. + + Type of the object. + The created object. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Gets a value indicating whether this can write JSON. + + + true if this can write JSON; otherwise, false. + + + + + Provides a base class for converting a to and from JSON. + + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts a F# discriminated union type to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts a to and from the ISO 8601 date format (e.g. 2008-04-12T12:53Z). + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Gets or sets the date time styles used when converting a date to and from JSON. + + The date time styles used when converting a date to and from JSON. + + + + Gets or sets the date time format used when converting a date to and from JSON. + + The date time format used when converting a date to and from JSON. + + + + Gets or sets the culture used when converting a date to and from JSON. + + The culture used when converting a date to and from JSON. + + + + Converts a to and from a JavaScript date constructor (e.g. new Date(52231943)). + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing property value of the JSON that is being converted. + The calling serializer. + The object value. + + + + Converts a to and from JSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts a to and from JSON and BSON. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Converts an to and from its name string value. + + + + + Initializes a new instance of the class. + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing value of object being read. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Gets or sets a value indicating whether the written enum text should be camel case. + + true if the written enum text will be camel case; otherwise, false. + + + + Gets or sets a value indicating whether integer values are allowed. + + true if integers are allowed; otherwise, false. + + + + Converts a to and from a string (e.g. "1.2.3.4"). + + + + + Writes the JSON representation of the object. + + The to write to. + The value. + The calling serializer. + + + + Reads the JSON representation of the object. + + The to read from. + Type of the object. + The existing property value of the JSON that is being converted. + The calling serializer. + The object value. + + + + Determines whether this instance can convert the specified object type. + + Type of the object. + + true if this instance can convert the specified object type; otherwise, false. + + + + + Specifies how dates are formatted when writing JSON text. + + + + + Dates are written in the ISO 8601 format, e.g. "2012-03-21T05:40Z". + + + + + Dates are written in the Microsoft JSON format, e.g. "\/Date(1198908717056)\/". + + + + + Specifies how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON text. + + + + + Date formatted strings are not parsed to a date type and are read as strings. + + + + + Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . + + + + + Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . + + + + + Specifies how to treat the time value when converting between string and . + + + + + Treat as local time. If the object represents a Coordinated Universal Time (UTC), it is converted to the local time. + + + + + Treat as a UTC. If the object represents a local time, it is converted to a UTC. + + + + + Treat as a local time if a is being converted to a string. + If a string is being converted to , convert to a local time if a time zone is specified. + + + + + Time zone information should be preserved when converting. + + + + + Specifies default value handling options for the . + + + + + + + + + Include members where the member value is the same as the member's default value when serializing objects. + Included members are written to JSON. Has no effect when deserializing. + + + + + Ignore members where the member value is the same as the member's default value when serializing objects + so that is is not written to JSON. + This option will ignore all default values (e.g. null for objects and nullable types; 0 for integers, + decimals and floating point numbers; and false for booleans). The default value ignored can be changed by + placing the on the property. + + + + + Members with a default value but no JSON will be set to their default value when deserializing. + + + + + Ignore members where the member value is the same as the member's default value when serializing objects + and sets members to their default value when deserializing. + + + + + Specifies float format handling options when writing special floating point numbers, e.g. , + and with . + + + + + Write special floating point values as strings in JSON, e.g. "NaN", "Infinity", "-Infinity". + + + + + Write special floating point values as symbols in JSON, e.g. NaN, Infinity, -Infinity. + Note that this will produce non-valid JSON. + + + + + Write special floating point values as the property's default value in JSON, e.g. 0.0 for a property, null for a property. + + + + + Specifies how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Floating point numbers are parsed to . + + + + + Floating point numbers are parsed to . + + + + + Indicates the method that will be used during deserialization for locating and loading assemblies. + + + + + In simple mode, the assembly used during deserialization need not match exactly the assembly used during serialization. Specifically, the version numbers need not match as the LoadWithPartialName method is used to load the assembly. + + + + + In full mode, the assembly used during deserialization must match exactly the assembly used during serialization. The Load method of the Assembly class is used to load the assembly. + + + + + Specifies formatting options for the . + + + + + No special formatting is applied. This is the default. + + + + + Causes child objects to be indented according to the and settings. + + + + + Provides an interface to enable a class to return line and position information. + + + + + Gets a value indicating whether the class can return line information. + + + true if LineNumber and LinePosition can be provided; otherwise, false. + + + + + Gets the current line number. + + The current line number or 0 if no line information is available (for example, HasLineInfo returns false). + + + + Gets the current line position. + + The current line position or 0 if no line information is available (for example, HasLineInfo returns false). + + + + Instructs the how to serialize the collection. + + + + + Instructs the how to serialize the object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + Gets or sets the id. + + The id. + + + + Gets or sets the title. + + The title. + + + + Gets or sets the description. + + The description. + + + + Gets the collection's items converter. + + The collection's items converter. + + + + The parameter list to use when constructing the JsonConverter described by ItemConverterType. + If null, the default constructor is used. + When non-null, there must be a constructor defined in the JsonConverter that exactly matches the number, + order, and type of these parameters. + + + [JsonContainer(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })] + + + + + Gets or sets a value that indicates whether to preserve object references. + + + true to keep object reference; otherwise, false. The default is false. + + + + + Gets or sets a value that indicates whether to preserve collection's items references. + + + true to keep collection's items object references; otherwise, false. The default is false. + + + + + Gets or sets the reference loop handling used when serializing the collection's items. + + The reference loop handling. + + + + Gets or sets the type name handling used when serializing the collection's items. + + The type name handling. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with a flag indicating whether the array can contain null items + + A flag indicating whether the array can contain null items. + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + Gets or sets a value indicating whether null items are allowed in the collection. + + true if null items are allowed in the collection; otherwise, false. + + + + Instructs the to use the specified constructor when deserializing that object. + + + + + Provides methods for converting between common language runtime types and JSON types. + + + + + + + + Represents JavaScript's boolean value true as a string. This field is read-only. + + + + + Represents JavaScript's boolean value false as a string. This field is read-only. + + + + + Represents JavaScript's null as a string. This field is read-only. + + + + + Represents JavaScript's undefined as a string. This field is read-only. + + + + + Represents JavaScript's positive infinity as a string. This field is read-only. + + + + + Represents JavaScript's negative infinity as a string. This field is read-only. + + + + + Represents JavaScript's NaN as a string. This field is read-only. + + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation using the specified. + + The value to convert. + The format the date will be converted to. + The time zone handling when the date is converted to a string. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation using the specified. + + The value to convert. + The format the date will be converted to. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + The string delimiter character. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + The string delimiter character. + The string escape handling. + A JSON string representation of the . + + + + Converts the to its JSON string representation. + + The value to convert. + A JSON string representation of the . + + + + Serializes the specified object to a JSON string. + + The object to serialize. + A JSON string representation of the object. + + + + Serializes the specified object to a JSON string using formatting. + + The object to serialize. + Indicates how the output is formatted. + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using a collection of . + + The object to serialize. + A collection converters used while serializing. + A JSON string representation of the object. + + + + Serializes the specified object to a JSON string using formatting and a collection of . + + The object to serialize. + Indicates how the output is formatted. + A collection converters used while serializing. + A JSON string representation of the object. + + + + Serializes the specified object to a JSON string using . + + The object to serialize. + The used to serialize the object. + If this is null, default serialization settings will be used. + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using a type, formatting and . + + The object to serialize. + The used to serialize the object. + If this is null, default serialization settings will be used. + + The type of the value being serialized. + This parameter is used when is Auto to write out the type name if the type of the value does not match. + Specifing the type is optional. + + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using formatting and . + + The object to serialize. + Indicates how the output is formatted. + The used to serialize the object. + If this is null, default serialization settings will be used. + + A JSON string representation of the object. + + + + + Serializes the specified object to a JSON string using a type, formatting and . + + The object to serialize. + Indicates how the output is formatted. + The used to serialize the object. + If this is null, default serialization settings will be used. + + The type of the value being serialized. + This parameter is used when is Auto to write out the type name if the type of the value does not match. + Specifing the type is optional. + + + A JSON string representation of the object. + + + + + Deserializes the JSON to a .NET object. + + The JSON to deserialize. + The deserialized object from the JSON string. + + + + Deserializes the JSON to a .NET object using . + + The JSON to deserialize. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type. + + The JSON to deserialize. + The of object being deserialized. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type. + + The type of the object to deserialize to. + The JSON to deserialize. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the given anonymous type. + + + The anonymous type to deserialize to. This can't be specified + traditionally and must be infered from the anonymous type passed + as a parameter. + + The JSON to deserialize. + The anonymous type object. + The deserialized anonymous type from the JSON string. + + + + Deserializes the JSON to the given anonymous type using . + + + The anonymous type to deserialize to. This can't be specified + traditionally and must be infered from the anonymous type passed + as a parameter. + + The JSON to deserialize. + The anonymous type object. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized anonymous type from the JSON string. + + + + Deserializes the JSON to the specified .NET type using a collection of . + + The type of the object to deserialize to. + The JSON to deserialize. + Converters to use while deserializing. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type using . + + The type of the object to deserialize to. + The object to deserialize. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type using a collection of . + + The JSON to deserialize. + The type of the object to deserialize. + Converters to use while deserializing. + The deserialized object from the JSON string. + + + + Deserializes the JSON to the specified .NET type using . + + The JSON to deserialize. + The type of the object to deserialize to. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + The deserialized object from the JSON string. + + + + Populates the object with values from the JSON string. + + The JSON to populate values from. + The target object to populate values onto. + + + + Populates the object with values from the JSON string using . + + The JSON to populate values from. + The target object to populate values onto. + + The used to deserialize the object. + If this is null, default serialization settings will be used. + + + + + Gets or sets a function that creates default . + Default settings are automatically used by serialization methods on , + and and on . + To serialize without using any default settings create a with + . + + + + + Instructs the to use the specified when serializing the member or class. + + + + + Initializes a new instance of the class. + + Type of the converter. + + + + Initializes a new instance of the class. + + Type of the converter. + Parameter list to use when constructing the JsonConverter. Can be null. + + + + Gets the of the converter. + + The of the converter. + + + + The parameter list to use when constructing the JsonConverter described by ConverterType. + If null, the default constructor is used. + + + + + Represents a collection of . + + + + + Instructs the how to serialize the collection. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + The exception thrown when an error occurs during JSON serialization or deserialization. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Instructs the to deserialize properties with no matching class member into the specified collection + and write values during serialization. + + + + + Initializes a new instance of the class. + + + + + Gets or sets a value that indicates whether to write extension data when serializing the object. + + + true to write extension data when serializing the object; otherwise, false. The default is true. + + + + + Gets or sets a value that indicates whether to read extension data when deserializing the object. + + + true to read extension data when deserializing the object; otherwise, false. The default is true. + + + + + Instructs the not to serialize the public field or public read/write property value. + + + + + Instructs the how to serialize the object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified member serialization. + + The member serialization. + + + + Initializes a new instance of the class with the specified container Id. + + The container Id. + + + + Gets or sets the member serialization. + + The member serialization. + + + + Gets or sets a value that indicates whether the object's properties are required. + + + A value indicating whether the object's properties are required. + + + + + Instructs the to always serialize the member with the specified name. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified name. + + Name of the property. + + + + Gets or sets the converter used when serializing the property's collection items. + + The collection's items converter. + + + + The parameter list to use when constructing the JsonConverter described by ItemConverterType. + If null, the default constructor is used. + When non-null, there must be a constructor defined in the JsonConverter that exactly matches the number, + order, and type of these parameters. + + + [JsonProperty(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })] + + + + + Gets or sets the null value handling used when serializing this property. + + The null value handling. + + + + Gets or sets the default value handling used when serializing this property. + + The default value handling. + + + + Gets or sets the reference loop handling used when serializing this property. + + The reference loop handling. + + + + Gets or sets the object creation handling used when deserializing this property. + + The object creation handling. + + + + Gets or sets the type name handling used when serializing this property. + + The type name handling. + + + + Gets or sets whether this property's value is serialized as a reference. + + Whether this property's value is serialized as a reference. + + + + Gets or sets the order of serialization and deserialization of a member. + + The numeric order of serialization or deserialization. + + + + Gets or sets a value indicating whether this property is required. + + + A value indicating whether this property is required. + + + + + Gets or sets the name of the property. + + The name of the property. + + + + Gets or sets the the reference loop handling used when serializing the property's collection items. + + The collection's items reference loop handling. + + + + Gets or sets the the type name handling used when serializing the property's collection items. + + The collection's items type name handling. + + + + Gets or sets whether this property's collection items are serialized as a reference. + + Whether this property's collection items are serialized as a reference. + + + + The exception thrown when an error occurs while reading JSON text. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Gets the line number indicating where the error occurred. + + The line number indicating where the error occurred. + + + + Gets the line position indicating where the error occurred. + + The line position indicating where the error occurred. + + + + Gets the path to the JSON where the error occurred. + + The path to the JSON where the error occurred. + + + + Instructs the to always serialize the member, and require the member has a value. + + + + + The exception thrown when an error occurs during JSON serialization or deserialization. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Serializes and deserializes objects into and from the JSON format. + The enables you to control how objects are encoded into JSON. + + + + + Initializes a new instance of the class. + + + + + Creates a new instance. + The will not use default settings. + + + A new instance. + The will not use default settings. + + + + + Creates a new instance using the specified . + The will not use default settings. + + The settings to be applied to the . + + A new instance using the specified . + The will not use default settings. + + + + + Creates a new instance. + The will use default settings. + + + A new instance. + The will use default settings. + + + + + Creates a new instance using the specified . + The will use default settings. + + The settings to be applied to the . + + A new instance using the specified . + The will use default settings. + + + + + Populates the JSON values onto the target object. + + The that contains the JSON structure to reader values from. + The target object to populate values onto. + + + + Populates the JSON values onto the target object. + + The that contains the JSON structure to reader values from. + The target object to populate values onto. + + + + Deserializes the JSON structure contained by the specified . + + The that contains the JSON structure to deserialize. + The being deserialized. + + + + Deserializes the JSON structure contained by the specified + into an instance of the specified type. + + The containing the object. + The of object being deserialized. + The instance of being deserialized. + + + + Deserializes the JSON structure contained by the specified + into an instance of the specified type. + + The containing the object. + The type of the object to deserialize. + The instance of being deserialized. + + + + Deserializes the JSON structure contained by the specified + into an instance of the specified type. + + The containing the object. + The of object being deserialized. + The instance of being deserialized. + + + + Serializes the specified and writes the JSON structure + to a Stream using the specified . + + The used to write the JSON structure. + The to serialize. + + + + Serializes the specified and writes the JSON structure + to a Stream using the specified . + + The used to write the JSON structure. + The to serialize. + + The type of the value being serialized. + This parameter is used when is Auto to write out the type name if the type of the value does not match. + Specifing the type is optional. + + + + + Serializes the specified and writes the JSON structure + to a Stream using the specified . + + The used to write the JSON structure. + The to serialize. + + The type of the value being serialized. + This parameter is used when is Auto to write out the type name if the type of the value does not match. + Specifing the type is optional. + + + + + Serializes the specified and writes the JSON structure + to a Stream using the specified . + + The used to write the JSON structure. + The to serialize. + + + + Occurs when the errors during serialization and deserialization. + + + + + Gets or sets the used by the serializer when resolving references. + + + + + Gets or sets the used by the serializer when resolving type names. + + + + + Gets or sets the used by the serializer when writing trace messages. + + The trace writer. + + + + Gets or sets the equality comparer used by the serializer when comparing references. + + The equality comparer. + + + + Gets or sets how type name writing and reading is handled by the serializer. + + + + + Gets or sets how a type name assembly is written and resolved by the serializer. + + The type name assembly format. + + + + Gets or sets how object references are preserved by the serializer. + + + + + Get or set how reference loops (e.g. a class referencing itself) is handled. + + + + + Get or set how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. + + + + + Get or set how null values are handled during serialization and deserialization. + + + + + Get or set how null default are handled during serialization and deserialization. + + + + + Gets or sets how objects are created during deserialization. + + The object creation handling. + + + + Gets or sets how constructors are used during deserialization. + + The constructor handling. + + + + Gets or sets how metadata properties are used during deserialization. + + The metadata properties handling. + + + + Gets a collection that will be used during serialization. + + Collection that will be used during serialization. + + + + Gets or sets the contract resolver used by the serializer when + serializing .NET objects to JSON and vice versa. + + + + + Gets or sets the used by the serializer when invoking serialization callback methods. + + The context. + + + + Indicates how JSON text output is formatted. + + + + + Get or set how dates are written to JSON text. + + + + + Get or set how time zones are handling during serialization and deserialization. + + + + + Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. + + + + + Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Get or set how special floating point numbers, e.g. , + and , + are written as JSON text. + + + + + Get or set how strings are escaped when writing JSON text. + + + + + Get or set how and values are formatted when writing JSON text, and the expected date format when reading JSON text. + + + + + Gets or sets the culture used when reading JSON. Defaults to . + + + + + Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + + + + + Gets a value indicating whether there will be a check for additional JSON content after deserializing an object. + + + true if there will be a check for additional JSON content after deserializing an object; otherwise, false. + + + + + Specifies the settings on a object. + + + + + Initializes a new instance of the class. + + + + + Gets or sets how reference loops (e.g. a class referencing itself) is handled. + + Reference loop handling. + + + + Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. + + Missing member handling. + + + + Gets or sets how objects are created during deserialization. + + The object creation handling. + + + + Gets or sets how null values are handled during serialization and deserialization. + + Null value handling. + + + + Gets or sets how null default are handled during serialization and deserialization. + + The default value handling. + + + + Gets or sets a collection that will be used during serialization. + + The converters. + + + + Gets or sets how object references are preserved by the serializer. + + The preserve references handling. + + + + Gets or sets how type name writing and reading is handled by the serializer. + + The type name handling. + + + + Gets or sets how metadata properties are used during deserialization. + + The metadata properties handling. + + + + Gets or sets how a type name assembly is written and resolved by the serializer. + + The type name assembly format. + + + + Gets or sets how constructors are used during deserialization. + + The constructor handling. + + + + Gets or sets the contract resolver used by the serializer when + serializing .NET objects to JSON and vice versa. + + The contract resolver. + + + + Gets or sets the equality comparer used by the serializer when comparing references. + + The equality comparer. + + + + Gets or sets the used by the serializer when resolving references. + + The reference resolver. + + + + Gets or sets a function that creates the used by the serializer when resolving references. + + A function that creates the used by the serializer when resolving references. + + + + Gets or sets the used by the serializer when writing trace messages. + + The trace writer. + + + + Gets or sets the used by the serializer when resolving type names. + + The binder. + + + + Gets or sets the error handler called during serialization and deserialization. + + The error handler called during serialization and deserialization. + + + + Gets or sets the used by the serializer when invoking serialization callback methods. + + The context. + + + + Get or set how and values are formatted when writing JSON text, and the expected date format when reading JSON text. + + + + + Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . + + + + + Indicates how JSON text output is formatted. + + + + + Get or set how dates are written to JSON text. + + + + + Get or set how time zones are handling during serialization and deserialization. + + + + + Get or set how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. + + + + + Get or set how special floating point numbers, e.g. , + and , + are written as JSON. + + + + + Get or set how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. + + + + + Get or set how strings are escaped when writing JSON text. + + + + + Gets or sets the culture used when reading JSON. Defaults to . + + + + + Gets a value indicating whether there will be a check for additional content after deserializing an object. + + + true if there will be a check for additional content after deserializing an object; otherwise, false. + + + + + Represents a reader that provides fast, non-cached, forward-only access to JSON text data. + + + + + Initializes a new instance of the class with the specified . + + The TextReader containing the XML data to read. + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Reads the next JSON token from the stream as a []. + + + A [] or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Changes the state to closed. + + + + + Gets a value indicating whether the class can return line information. + + + true if LineNumber and LinePosition can be provided; otherwise, false. + + + + + Gets the current line number. + + + The current line number or 0 if no line information is available (for example, HasLineInfo returns false). + + + + + Gets the current line position. + + + The current line position or 0 if no line information is available (for example, HasLineInfo returns false). + + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Creates an instance of the JsonWriter class using the specified . + + The TextWriter to write to. + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Closes this stream and the underlying stream. + + + + + Writes the beginning of a JSON object. + + + + + Writes the beginning of a JSON array. + + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes the specified end token. + + The end token to write. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + A flag to indicate whether the text should be escaped when it is written as a JSON property name. + + + + Writes indent characters. + + + + + Writes the JSON value delimiter. + + + + + Writes an indent space. + + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes raw JSON. + + The raw JSON to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes out the given white space. + + The string of white space characters. + + + + Gets or sets how many IndentChars to write for each level in the hierarchy when is set to Formatting.Indented. + + + + + Gets or sets which character to use to quote attribute values. + + + + + Gets or sets which character to use for indenting when is set to Formatting.Indented. + + + + + Gets or sets a value indicating whether object names will be surrounded with quotes. + + + + + Specifies the type of JSON token. + + + + + This is returned by the if a method has not been called. + + + + + An object start token. + + + + + An array start token. + + + + + A constructor start token. + + + + + An object property name. + + + + + A comment. + + + + + Raw JSON. + + + + + An integer. + + + + + A float. + + + + + A string. + + + + + A boolean. + + + + + A null token. + + + + + An undefined token. + + + + + An object end token. + + + + + An array end token. + + + + + A constructor end token. + + + + + A Date. + + + + + Byte data. + + + + + + Represents a reader that provides validation. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Initializes a new instance of the class that + validates the content returned from the given . + + The to read from while validating. + + + + Reads the next JSON token from the stream as a . + + A . + + + + Reads the next JSON token from the stream as a []. + + + A [] or a null reference if the next JSON token is null. + + + + + Reads the next JSON token from the stream as a . + + A . + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Sets an event handler for receiving schema validation errors. + + + + + Gets the text value of the current JSON token. + + + + + + Gets the depth of the current token in the JSON document. + + The depth of the current token in the JSON document. + + + + Gets the path of the current JSON token. + + + + + Gets the quotation mark character used to enclose the value of a string. + + + + + + Gets the type of the current JSON token. + + + + + + Gets the Common Language Runtime (CLR) type for the current JSON token. + + + + + + Gets or sets the schema. + + The schema. + + + + Gets the used to construct this . + + The specified in the constructor. + + + + The exception thrown when an error occurs while reading JSON text. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Gets the path to the JSON where the error occurred. + + The path to the JSON where the error occurred. + + + + Contains the LINQ to JSON extension methods. + + + + + Returns a collection of tokens that contains the ancestors of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains the ancestors of every token in the source collection. + + + + Returns a collection of tokens that contains every token in the source collection, and the ancestors of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains every token in the source collection, the ancestors of every token in the source collection. + + + + Returns a collection of tokens that contains the descendants of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains the descendants of every token in the source collection. + + + + Returns a collection of tokens that contains every token in the source collection, and the descendants of every token in the source collection. + + The type of the objects in source, constrained to . + An of that contains the source collection. + An of that contains every token in the source collection, and the descendants of every token in the source collection. + + + + Returns a collection of child properties of every object in the source collection. + + An of that contains the source collection. + An of that contains the properties of every object in the source collection. + + + + Returns a collection of child values of every object in the source collection with the given key. + + An of that contains the source collection. + The token key. + An of that contains the values of every token in the source collection with the given key. + + + + Returns a collection of child values of every object in the source collection. + + An of that contains the source collection. + An of that contains the values of every token in the source collection. + + + + Returns a collection of converted child values of every object in the source collection with the given key. + + The type to convert the values to. + An of that contains the source collection. + The token key. + An that contains the converted values of every token in the source collection with the given key. + + + + Returns a collection of converted child values of every object in the source collection. + + The type to convert the values to. + An of that contains the source collection. + An that contains the converted values of every token in the source collection. + + + + Converts the value. + + The type to convert the value to. + A cast as a of . + A converted value. + + + + Converts the value. + + The source collection type. + The type to convert the value to. + A cast as a of . + A converted value. + + + + Returns a collection of child tokens of every array in the source collection. + + The source collection type. + An of that contains the source collection. + An of that contains the values of every token in the source collection. + + + + Returns a collection of converted child tokens of every array in the source collection. + + An of that contains the source collection. + The type to convert the values to. + The source collection type. + An that contains the converted values of every token in the source collection. + + + + Returns the input typed as . + + An of that contains the source collection. + The input typed as . + + + + Returns the input typed as . + + The source collection type. + An of that contains the source collection. + The input typed as . + + + + Represents a collection of objects. + + The type of token + + + + Gets the with the specified key. + + + + + + Represents a JSON array. + + + + + + + + Represents a token that can contain other tokens. + + + + + Represents an abstract JSON token. + + + + + Compares the values of two tokens, including the values of all descendant tokens. + + The first to compare. + The second to compare. + true if the tokens are equal; otherwise false. + + + + Adds the specified content immediately after this token. + + A content object that contains simple content or a collection of content objects to be added after this token. + + + + Adds the specified content immediately before this token. + + A content object that contains simple content or a collection of content objects to be added before this token. + + + + Returns a collection of the ancestor tokens of this token. + + A collection of the ancestor tokens of this token. + + + + Returns a collection of tokens that contain this token, and the ancestors of this token. + + A collection of tokens that contain this token, and the ancestors of this token. + + + + Returns a collection of the sibling tokens after this token, in document order. + + A collection of the sibling tokens after this tokens, in document order. + + + + Returns a collection of the sibling tokens before this token, in document order. + + A collection of the sibling tokens before this token, in document order. + + + + Gets the with the specified key converted to the specified type. + + The type to convert the token to. + The token key. + The converted token value. + + + + Returns a collection of the child tokens of this token, in document order. + + An of containing the child tokens of this , in document order. + + + + Returns a collection of the child tokens of this token, in document order, filtered by the specified type. + + The type to filter the child tokens on. + A containing the child tokens of this , in document order. + + + + Returns a collection of the child values of this token, in document order. + + The type to convert the values to. + A containing the child values of this , in document order. + + + + Removes this token from its parent. + + + + + Replaces this token with the specified token. + + The value. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Returns the indented JSON for this token. + + + The indented JSON for this token. + + + + + Returns the JSON for this token using the given formatting and converters. + + Indicates how the output is formatted. + A collection of which will be used when writing the token. + The JSON for this token using the given formatting and converters. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to []. + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an explicit conversion from to . + + The value. + The result of the conversion. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from [] to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Performs an implicit conversion from to . + + The value to create a from. + The initialized with the specified value. + + + + Creates an for this token. + + An that can be used to read this token and its descendants. + + + + Creates a from an object. + + The object that will be used to create . + A with the value of the specified object + + + + Creates a from an object using the specified . + + The object that will be used to create . + The that will be used when reading the object. + A with the value of the specified object + + + + Creates the specified .NET type from the . + + The object type that the token will be deserialized to. + The new object created from the JSON value. + + + + Creates the specified .NET type from the . + + The object type that the token will be deserialized to. + The new object created from the JSON value. + + + + Creates the specified .NET type from the using the specified . + + The object type that the token will be deserialized to. + The that will be used when creating the object. + The new object created from the JSON value. + + + + Creates the specified .NET type from the using the specified . + + The object type that the token will be deserialized to. + The that will be used when creating the object. + The new object created from the JSON value. + + + + Creates a from a . + + An positioned at the token to read into this . + + An that contains the token and its descendant tokens + that were read from the reader. The runtime type of the token is determined + by the token type of the first token encountered in the reader. + + + + + Load a from a string that contains JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + Creates a from a . + + An positioned at the token to read into this . + + An that contains the token and its descendant tokens + that were read from the reader. The runtime type of the token is determined + by the token type of the first token encountered in the reader. + + + + + Selects a using a JPath expression. Selects the token that matches the object path. + + + A that contains a JPath expression. + + A , or null. + + + + Selects a using a JPath expression. Selects the token that matches the object path. + + + A that contains a JPath expression. + + A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. + A . + + + + Selects a collection of elements using a JPath expression. + + + A that contains a JPath expression. + + An that contains the selected elements. + + + + Selects a collection of elements using a JPath expression. + + + A that contains a JPath expression. + + A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. + An that contains the selected elements. + + + + Creates a new instance of the . All child tokens are recursively cloned. + + A new instance of the . + + + + Adds an object to the annotation list of this . + + The annotation to add. + + + + Get the first annotation object of the specified type from this . + + The type of the annotation to retrieve. + The first annotation object that matches the specified type, or null if no annotation is of the specified type. + + + + Gets the first annotation object of the specified type from this . + + The of the annotation to retrieve. + The first annotation object that matches the specified type, or null if no annotation is of the specified type. + + + + Gets a collection of annotations of the specified type for this . + + The type of the annotations to retrieve. + An that contains the annotations for this . + + + + Gets a collection of annotations of the specified type for this . + + The of the annotations to retrieve. + An of that contains the annotations that match the specified type for this . + + + + Removes the annotations of the specified type from this . + + The type of annotations to remove. + + + + Removes the annotations of the specified type from this . + + The of annotations to remove. + + + + Gets a comparer that can compare two tokens for value equality. + + A that can compare two nodes for value equality. + + + + Gets or sets the parent. + + The parent. + + + + Gets the root of this . + + The root of this . + + + + Gets the node type for this . + + The type. + + + + Gets a value indicating whether this token has child tokens. + + + true if this token has child values; otherwise, false. + + + + + Gets the next sibling token of this node. + + The that contains the next sibling token. + + + + Gets the previous sibling token of this node. + + The that contains the previous sibling token. + + + + Gets the path of the JSON token. + + + + + Gets the with the specified key. + + The with the specified key. + + + + Get the first child token of this token. + + A containing the first child token of the . + + + + Get the last child token of this token. + + A containing the last child token of the . + + + + Returns a collection of the child tokens of this token, in document order. + + + An of containing the child tokens of this , in document order. + + + + + Returns a collection of the child values of this token, in document order. + + The type to convert the values to. + + A containing the child values of this , in document order. + + + + + Returns a collection of the descendant tokens for this token in document order. + + An containing the descendant tokens of the . + + + + Returns a collection of the tokens that contain this token, and all descendant tokens of this token, in document order. + + An containing this token, and all the descendant tokens of the . + + + + Adds the specified content as children of this . + + The content to be added. + + + + Adds the specified content as the first children of this . + + The content to be added. + + + + Creates an that can be used to add tokens to the . + + An that is ready to have content written to it. + + + + Replaces the children nodes of this token with the specified content. + + The content. + + + + Removes the child nodes from this token. + + + + + Merge the specified content into this . + + The content to be merged. + + + + Merge the specified content into this using . + + The content to be merged. + The used to merge the content. + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets a value indicating whether this token has child tokens. + + + true if this token has child values; otherwise, false. + + + + + Get the first child token of this token. + + + A containing the first child token of the . + + + + + Get the last child token of this token. + + + A containing the last child token of the . + + + + + Gets the count of child JSON tokens. + + The count of child JSON tokens + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the specified content. + + The contents of the array. + + + + Initializes a new instance of the class with the specified content. + + The contents of the array. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Load a from a string that contains JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + + + + Creates a from an object. + + The object that will be used to create . + A with the values of the specified object + + + + Creates a from an object. + + The object that will be used to create . + The that will be used to read the object. + A with the values of the specified object + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Determines the index of a specific item in the . + + The object to locate in the . + + The index of if found in the list; otherwise, -1. + + + + + Inserts an item to the at the specified index. + + The zero-based index at which should be inserted. + The object to insert into the . + + is not a valid index in the . + The is read-only. + + + + Removes the item at the specified index. + + The zero-based index of the item to remove. + + is not a valid index in the . + The is read-only. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Adds an item to the . + + The object to add to the . + The is read-only. + + + + Removes all items from the . + + The is read-only. + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if is found in the ; otherwise, false. + + + + + Copies to. + + The array. + Index of the array. + + + + Removes the first occurrence of a specific object from the . + + The object to remove from the . + + true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . + + The is read-only. + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets the node type for this . + + The type. + + + + Gets the with the specified key. + + The with the specified key. + + + + Gets or sets the at the specified index. + + + + + + Gets a value indicating whether the is read-only. + + true if the is read-only; otherwise, false. + + + + Represents a JSON constructor. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the specified name and content. + + The constructor name. + The contents of the constructor. + + + + Initializes a new instance of the class with the specified name and content. + + The constructor name. + The contents of the constructor. + + + + Initializes a new instance of the class with the specified name. + + The constructor name. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets or sets the name of this constructor. + + The constructor name. + + + + Gets the node type for this . + + The type. + + + + Gets the with the specified key. + + The with the specified key. + + + + Represents a collection of objects. + + The type of token + + + + An empty collection of objects. + + + + + Initializes a new instance of the struct. + + The enumerable. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + true if the specified is equal to this instance; otherwise, false. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Gets the with the specified key. + + + + + + Represents a JSON object. + + + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the specified content. + + The contents of the object. + + + + Initializes a new instance of the class with the specified content. + + The contents of the object. + + + + Gets an of this object's properties. + + An of this object's properties. + + + + Gets a the specified name. + + The property name. + A with the specified name or null. + + + + Gets an of this object's property values. + + An of this object's property values. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Load a from a string that contains JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + + + + Creates a from an object. + + The object that will be used to create . + A with the values of the specified object + + + + Creates a from an object. + + The object that will be used to create . + The that will be used to read the object. + A with the values of the specified object + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Gets the with the specified property name. + + Name of the property. + The with the specified property name. + + + + Gets the with the specified property name. + The exact property name will be searched for first and if no matching property is found then + the will be used to match a property. + + Name of the property. + One of the enumeration values that specifies how the strings will be compared. + The with the specified property name. + + + + Tries to get the with the specified property name. + The exact property name will be searched for first and if no matching property is found then + the will be used to match a property. + + Name of the property. + The value. + One of the enumeration values that specifies how the strings will be compared. + true if a value was successfully retrieved; otherwise, false. + + + + Adds the specified property name. + + Name of the property. + The value. + + + + Removes the property with the specified name. + + Name of the property. + true if item was successfully removed; otherwise, false. + + + + Tries the get value. + + Name of the property. + The value. + true if a value was successfully retrieved; otherwise, false. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Raises the event with the provided arguments. + + Name of the property. + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Occurs when a property value changes. + + + + + Gets the node type for this . + + The type. + + + + Gets the with the specified key. + + The with the specified key. + + + + Gets or sets the with the specified property name. + + + + + + Represents a JSON property. + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class. + + The property name. + The property content. + + + + Initializes a new instance of the class. + + The property name. + The property content. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Loads an from a . + + A that will be read for the content of the . + A that contains the JSON that was read from the specified . + + + + Gets the container's children tokens. + + The container's children tokens. + + + + Gets the property name. + + The property name. + + + + Gets or sets the property value. + + The property value. + + + + Gets the node type for this . + + The type. + + + + Represents a raw JSON string. + + + + + Represents a value in JSON (string, integer, date, etc). + + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Initializes a new instance of the class with the given value. + + The value. + + + + Creates a comment with the given value. + + The value. + A comment with the given value. + + + + Creates a string with the given value. + + The value. + A string with the given value. + + + + Creates a null value. + + A null value. + + + + Creates a null value. + + A null value. + + + + Writes this token to a . + + A into which this method will write. + A collection of which will be used when writing the token. + + + + Indicates whether the current object is equal to another object of the same type. + + + true if the current object is equal to the parameter; otherwise, false. + + An object to compare with this object. + + + + Determines whether the specified is equal to the current . + + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + + The parameter is null. + + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns a that represents this instance. + + The format. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The format provider. + + A that represents this instance. + + + + + Returns a that represents this instance. + + The format. + The format provider. + + A that represents this instance. + + + + + Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. + + An object to compare with this instance. + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings: + Value + Meaning + Less than zero + This instance is less than . + Zero + This instance is equal to . + Greater than zero + This instance is greater than . + + + is not the same type as this instance. + + + + + Gets a value indicating whether this token has child tokens. + + + true if this token has child values; otherwise, false. + + + + + Gets the node type for this . + + The type. + + + + Gets or sets the underlying token value. + + The underlying token value. + + + + Initializes a new instance of the class from another object. + + A object to copy from. + + + + Initializes a new instance of the class. + + The raw json. + + + + Creates an instance of with the content of the reader's current token. + + The reader. + An instance of with the content of the reader's current token. + + + + Specifies the settings used when merging JSON. + + + + + Gets or sets the method used when merging JSON arrays. + + The method used when merging JSON arrays. + + + + Compares tokens to determine whether they are equal. + + + + + Determines whether the specified objects are equal. + + The first object of type to compare. + The second object of type to compare. + + true if the specified objects are equal; otherwise, false. + + + + + Returns a hash code for the specified object. + + The for which a hash code is to be returned. + A hash code for the specified object. + The type of is a reference type and is null. + + + + Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. + + + + + Initializes a new instance of the class. + + The token to read from. + + + + Reads the next JSON token from the stream as a []. + + + A [] or a null reference if the next JSON token is null. This method will return null at the end of an array. + + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream as a . + + A . This method will return null at the end of an array. + + + + Reads the next JSON token from the stream. + + + true if the next token was read successfully; false if there are no more tokens to read. + + + + + Gets the at the reader's current position. + + + + + Gets the path of the current JSON token. + + + + + Specifies the type of token. + + + + + No token type has been set. + + + + + A JSON object. + + + + + A JSON array. + + + + + A JSON constructor. + + + + + A JSON object property. + + + + + A comment. + + + + + An integer value. + + + + + A float value. + + + + + A string value. + + + + + A boolean value. + + + + + A null value. + + + + + An undefined value. + + + + + A date value. + + + + + A raw JSON value. + + + + + A collection of bytes value. + + + + + A Guid value. + + + + + A Uri value. + + + + + A TimeSpan value. + + + + + Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. + + + + + Initializes a new instance of the class writing to the given . + + The container being written to. + + + + Initializes a new instance of the class. + + + + + Flushes whatever is in the buffer to the underlying streams and also flushes the underlying stream. + + + + + Closes this stream and the underlying stream. + + + + + Writes the beginning of a JSON object. + + + + + Writes the beginning of a JSON array. + + + + + Writes the start of a constructor with the given name. + + The name of the constructor. + + + + Writes the end. + + The token. + + + + Writes the property name of a name/value pair on a JSON object. + + The name of the property. + + + + Writes a value. + An error will raised if the value cannot be written as a single JSON token. + + The value to write. + + + + Writes a null value. + + + + + Writes an undefined value. + + + + + Writes raw JSON. + + The raw JSON to write. + + + + Writes out a comment /*...*/ containing the specified text. + + Text to place inside the comment. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a [] value. + + The [] value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Writes a value. + + The value to write. + + + + Gets the at the writer's current position. + + + + + Gets the token being writen. + + The token being writen. + + + + Specifies how JSON arrays are merged together. + + + + Concatenate arrays. + + + Union arrays, skipping items that already exist. + + + Replace all array items. + + + Merge array items together, matched by index. + + + + Specifies the member serialization options for the . + + + + + All public members are serialized by default. Members can be excluded using or . + This is the default member serialization mode. + + + + + Only members must be marked with or are serialized. + This member serialization mode can also be set by marking the class with . + + + + + All public and private fields are serialized. Members can be excluded using or . + This member serialization mode can also be set by marking the class with + and setting IgnoreSerializableAttribute on to false. + + + + + Specifies metadata property handling options for the . + + + + + Read metadata properties located at the start of a JSON object. + + + + + Read metadata properties located anywhere in a JSON object. Note that this setting will impact performance. + + + + + Do not try to read metadata properties. + + + + + Specifies missing member handling options for the . + + + + + Ignore a missing member and do not attempt to deserialize it. + + + + + Throw a when a missing member is encountered during deserialization. + + + + + Specifies null value handling options for the . + + + + + + + + + Include null values when serializing and deserializing objects. + + + + + Ignore null values when serializing and deserializing objects. + + + + + Specifies how object creation is handled by the . + + + + + Reuse existing objects, create new objects when needed. + + + + + Only reuse existing objects. + + + + + Always create new objects. + + + + + Specifies reference handling options for the . + Note that references cannot be preserved when a value is set via a non-default constructor such as types that implement ISerializable. + + + + + + + + Do not preserve references when serializing types. + + + + + Preserve references when serializing into a JSON object structure. + + + + + Preserve references when serializing into a JSON array structure. + + + + + Preserve references when serializing. + + + + + Specifies reference loop handling options for the . + + + + + Throw a when a loop is encountered. + + + + + Ignore loop references and do not serialize. + + + + + Serialize loop references. + + + + + Indicating whether a property is required. + + + + + The property is not required. The default state. + + + + + The property must be defined in JSON but can be a null value. + + + + + The property must be defined in JSON and cannot be a null value. + + + + + + Contains the JSON schema extension methods. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + + Determines whether the is valid. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + + true if the specified is valid; otherwise, false. + + + + + + Determines whether the is valid. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + When this method returns, contains any error messages generated while validating. + + true if the specified is valid; otherwise, false. + + + + + + Validates the specified . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + + + + + Validates the specified . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + The source to test. + The schema to test with. + The validation event handler. + + + + + An in-memory representation of a JSON Schema. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Initializes a new instance of the class. + + + + + Reads a from the specified . + + The containing the JSON Schema to read. + The object representing the JSON Schema. + + + + Reads a from the specified . + + The containing the JSON Schema to read. + The to use when resolving schema references. + The object representing the JSON Schema. + + + + Load a from a string that contains schema JSON. + + A that contains JSON. + A populated from the string that contains JSON. + + + + Parses the specified json. + + The json. + The resolver. + A populated from the string that contains JSON. + + + + Writes this schema to a . + + A into which this method will write. + + + + Writes this schema to a using the specified . + + A into which this method will write. + The resolver used. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Gets or sets the id. + + + + + Gets or sets the title. + + + + + Gets or sets whether the object is required. + + + + + Gets or sets whether the object is read only. + + + + + Gets or sets whether the object is visible to users. + + + + + Gets or sets whether the object is transient. + + + + + Gets or sets the description of the object. + + + + + Gets or sets the types of values allowed by the object. + + The type. + + + + Gets or sets the pattern. + + The pattern. + + + + Gets or sets the minimum length. + + The minimum length. + + + + Gets or sets the maximum length. + + The maximum length. + + + + Gets or sets a number that the value should be divisble by. + + A number that the value should be divisble by. + + + + Gets or sets the minimum. + + The minimum. + + + + Gets or sets the maximum. + + The maximum. + + + + Gets or sets a flag indicating whether the value can not equal the number defined by the "minimum" attribute. + + A flag indicating whether the value can not equal the number defined by the "minimum" attribute. + + + + Gets or sets a flag indicating whether the value can not equal the number defined by the "maximum" attribute. + + A flag indicating whether the value can not equal the number defined by the "maximum" attribute. + + + + Gets or sets the minimum number of items. + + The minimum number of items. + + + + Gets or sets the maximum number of items. + + The maximum number of items. + + + + Gets or sets the of items. + + The of items. + + + + Gets or sets a value indicating whether items in an array are validated using the instance at their array position from . + + + true if items are validated using their array position; otherwise, false. + + + + + Gets or sets the of additional items. + + The of additional items. + + + + Gets or sets a value indicating whether additional items are allowed. + + + true if additional items are allowed; otherwise, false. + + + + + Gets or sets whether the array items must be unique. + + + + + Gets or sets the of properties. + + The of properties. + + + + Gets or sets the of additional properties. + + The of additional properties. + + + + Gets or sets the pattern properties. + + The pattern properties. + + + + Gets or sets a value indicating whether additional properties are allowed. + + + true if additional properties are allowed; otherwise, false. + + + + + Gets or sets the required property if this property is present. + + The required property if this property is present. + + + + Gets or sets the a collection of valid enum values allowed. + + A collection of valid enum values allowed. + + + + Gets or sets disallowed types. + + The disallow types. + + + + Gets or sets the default value. + + The default value. + + + + Gets or sets the collection of that this schema extends. + + The collection of that this schema extends. + + + + Gets or sets the format. + + The format. + + + + + Returns detailed information about the schema exception. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a specified error message. + + The error message that explains the reason for the exception. + + + + Initializes a new instance of the class + with a specified error message and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + Gets the line number indicating where the error occurred. + + The line number indicating where the error occurred. + + + + Gets the line position indicating where the error occurred. + + The line position indicating where the error occurred. + + + + Gets the path to the JSON where the error occurred. + + The path to the JSON where the error occurred. + + + + + Generates a from a specified . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Generate a from the specified type. + + The type to generate a from. + A generated from the specified type. + + + + Generate a from the specified type. + + The type to generate a from. + The used to resolve schema references. + A generated from the specified type. + + + + Generate a from the specified type. + + The type to generate a from. + Specify whether the generated root will be nullable. + A generated from the specified type. + + + + Generate a from the specified type. + + The type to generate a from. + The used to resolve schema references. + Specify whether the generated root will be nullable. + A generated from the specified type. + + + + Gets or sets how undefined schemas are handled by the serializer. + + + + + Gets or sets the contract resolver. + + The contract resolver. + + + + + Resolves from an id. + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Initializes a new instance of the class. + + + + + Gets a for the specified reference. + + The id. + A for the specified reference. + + + + Gets or sets the loaded schemas. + + The loaded schemas. + + + + + The value types allowed by the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + No type specified. + + + + + String type. + + + + + Float type. + + + + + Integer type. + + + + + Boolean type. + + + + + Object type. + + + + + Array type. + + + + + Null type. + + + + + Any type. + + + + + + Specifies undefined schema Id handling options for the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Do not infer a schema Id. + + + + + Use the .NET type name as the schema Id. + + + + + Use the assembly qualified .NET type name as the schema Id. + + + + + + Returns detailed information related to the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Gets the associated with the validation error. + + The JsonSchemaException associated with the validation error. + + + + Gets the path of the JSON location where the validation error occurred. + + The path of the JSON location where the validation error occurred. + + + + Gets the text description corresponding to the validation error. + + The text description. + + + + + Represents the callback method that will handle JSON schema validation events and the . + + + JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + + + + + + Allows users to control class loading and mandate what class to load. + + + + + When overridden in a derived class, controls the binding of a serialized object to a type. + + Specifies the name of the serialized object. + Specifies the name of the serialized object + The type of the object the formatter creates a new instance of. + + + + When overridden in a derived class, controls the binding of a serialized object to a type. + + The type of the object the formatter creates a new instance of. + Specifies the name of the serialized object. + Specifies the name of the serialized object. + + + + Resolves member mappings for a type, camel casing property names. + + + + + Used by to resolves a for a given . + + + + + Used by to resolves a for a given . + + + + + + + + + Resolves the contract for a given type. + + The type to resolve a contract for. + The contract for a given type. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + If set to true the will use a cached shared with other resolvers of the same type. + Sharing the cache will significantly improve performance with multiple resolver instances because expensive reflection will only + happen once. This setting can cause unexpected behavior if different instances of the resolver are suppose to produce different + results. When set to false it is highly recommended to reuse instances with the . + + + + + Resolves the contract for a given type. + + The type to resolve a contract for. + The contract for a given type. + + + + Gets the serializable members for the type. + + The type to get serializable members for. + The serializable members for the type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates the constructor parameters. + + The constructor to create properties for. + The type's member properties. + Properties for the given . + + + + Creates a for the given . + + The matching member property. + The constructor parameter. + A created for the given . + + + + Resolves the default for the contract. + + Type of the object. + The contract's default . + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Creates a for the given type. + + Type of the object. + A for the given type. + + + + Determines which contract type is created for the given type. + + Type of the object. + A for the given type. + + + + Creates properties for the given . + + The type to create properties for. + /// The member serialization mode for the type. + Properties for the given . + + + + Creates the used by the serializer to get and set values from a member. + + The member. + The used by the serializer to get and set values from a member. + + + + Creates a for the given . + + The member's parent . + The member to create a for. + A created for the given . + + + + Resolves the name of the property. + + Name of the property. + Resolved name of the property. + + + + Resolves the key of the dictionary. By default is used to resolve dictionary keys. + + Key of the dictionary. + Resolved key of the dictionary. + + + + Gets the resolved name of the property. + + Name of the property. + Name of the property. + + + + Gets a value indicating whether members are being get and set using dynamic code generation. + This value is determined by the runtime permissions available. + + + true if using dynamic code generation; otherwise, false. + + + + + Gets or sets the default members search flags. + + The default members search flags. + + + + Gets or sets a value indicating whether compiler generated members should be serialized. + + + true if serialized compiler generated members; otherwise, false. + + + + + Initializes a new instance of the class. + + + + + Resolves the name of the property. + + Name of the property. + The property name camel cased. + + + + Used to resolve references when serializing and deserializing JSON by the . + + + + + Resolves a reference to its object. + + The serialization context. + The reference to resolve. + The object that + + + + Gets the reference for the sepecified object. + + The serialization context. + The object to get a reference for. + The reference to the object. + + + + Determines whether the specified object is referenced. + + The serialization context. + The object to test for a reference. + + true if the specified object is referenced; otherwise, false. + + + + + Adds a reference to the specified object. + + The serialization context. + The reference. + The object to reference. + + + + The default serialization binder used when resolving and loading classes from type names. + + + + + When overridden in a derived class, controls the binding of a serialized object to a type. + + Specifies the name of the serialized object. + Specifies the name of the serialized object. + + The type of the object the formatter creates a new instance of. + + + + + When overridden in a derived class, controls the binding of a serialized object to a type. + + The type of the object the formatter creates a new instance of. + Specifies the name of the serialized object. + Specifies the name of the serialized object. + + + + Provides information surrounding an error. + + + + + Gets the error. + + The error. + + + + Gets the original object that caused the error. + + The original object that caused the error. + + + + Gets the member that caused the error. + + The member that caused the error. + + + + Gets the path of the JSON location where the error occurred. + + The path of the JSON location where the error occurred. + + + + Gets or sets a value indicating whether this is handled. + + true if handled; otherwise, false. + + + + Provides data for the Error event. + + + + + Initializes a new instance of the class. + + The current object. + The error context. + + + + Gets the current object the error event is being raised against. + + The current object the error event is being raised against. + + + + Gets the error context. + + The error context. + + + + Get and set values for a using dynamic methods. + + + + + Provides methods to get and set values. + + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + Initializes a new instance of the class. + + The member info. + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + Provides methods to get attributes. + + + + + Returns a collection of all of the attributes, or an empty collection if there are no attributes. + + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Returns a collection of attributes, identified by type, or an empty collection if there are no attributes. + + The type of the attributes. + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Represents a trace writer. + + + + + Writes the specified trace level, message and optional exception. + + The at which to write this trace. + The trace message. + The trace exception. This parameter is optional. + + + + Gets the that will be used to filter the trace messages passed to the writer. + For example a filter level of Info will exclude Verbose messages and include Info, + Warning and Error messages. + + The that will be used to filter the trace messages passed to the writer. + + + + Contract details for a used by the . + + + + + Contract details for a used by the . + + + + + Contract details for a used by the . + + + + + Gets the underlying type for the contract. + + The underlying type for the contract. + + + + Gets or sets the type created during deserialization. + + The type created during deserialization. + + + + Gets or sets whether this type contract is serialized as a reference. + + Whether this type contract is serialized as a reference. + + + + Gets or sets the default for this contract. + + The converter. + + + + Gets or sets all methods called immediately after deserialization of the object. + + The methods called immediately after deserialization of the object. + + + + Gets or sets all methods called during deserialization of the object. + + The methods called during deserialization of the object. + + + + Gets or sets all methods called after serialization of the object graph. + + The methods called after serialization of the object graph. + + + + Gets or sets all methods called before serialization of the object. + + The methods called before serialization of the object. + + + + Gets or sets all method called when an error is thrown during the serialization of the object. + + The methods called when an error is thrown during the serialization of the object. + + + + Gets or sets the method called immediately after deserialization of the object. + + The method called immediately after deserialization of the object. + + + + Gets or sets the method called during deserialization of the object. + + The method called during deserialization of the object. + + + + Gets or sets the method called after serialization of the object graph. + + The method called after serialization of the object graph. + + + + Gets or sets the method called before serialization of the object. + + The method called before serialization of the object. + + + + Gets or sets the method called when an error is thrown during the serialization of the object. + + The method called when an error is thrown during the serialization of the object. + + + + Gets or sets the default creator method used to create the object. + + The default creator method used to create the object. + + + + Gets or sets a value indicating whether the default creator is non public. + + true if the default object creator is non-public; otherwise, false. + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets or sets the default collection items . + + The converter. + + + + Gets or sets a value indicating whether the collection items preserve object references. + + true if collection items preserve object references; otherwise, false. + + + + Gets or sets the collection item reference loop handling. + + The reference loop handling. + + + + Gets or sets the collection item type name handling. + + The type name handling. + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets the of the collection items. + + The of the collection items. + + + + Gets a value indicating whether the collection type is a multidimensional array. + + true if the collection type is a multidimensional array; otherwise, false. + + + + Handles serialization callback events. + + The object that raised the callback event. + The streaming context. + + + + Handles serialization error callback events. + + The object that raised the callback event. + The streaming context. + The error context. + + + + Sets extension data for an object during deserialization. + + The object to set extension data on. + The extension data key. + The extension data value. + + + + Gets extension data for an object during serialization. + + The object to set extension data on. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets or sets the property name resolver. + + The property name resolver. + + + + Gets or sets the dictionary key resolver. + + The dictionary key resolver. + + + + Gets the of the dictionary keys. + + The of the dictionary keys. + + + + Gets the of the dictionary values. + + The of the dictionary values. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Gets or sets the object member serialization. + + The member object serialization. + + + + Gets or sets a value that indicates whether the object's properties are required. + + + A value indicating whether the object's properties are required. + + + + + Gets the object's properties. + + The object's properties. + + + + Gets the constructor parameters required for any non-default constructor + + + + + Gets a collection of instances that define the parameters used with . + + + + + Gets or sets the override constructor used to create the object. + This is set when a constructor is marked up using the + JsonConstructor attribute. + + The override constructor. + + + + Gets or sets the parametrized constructor used to create the object. + + The parametrized constructor. + + + + Gets or sets the function used to create the object. When set this function will override . + This function is called with a collection of arguments which are defined by the collection. + + The function used to create the object. + + + + Gets or sets the extension data setter. + + + + + Gets or sets the extension data getter. + + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Maps a JSON property to a .NET member or constructor parameter. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets or sets the name of the property. + + The name of the property. + + + + Gets or sets the type that declared this property. + + The type that declared this property. + + + + Gets or sets the order of serialization and deserialization of a member. + + The numeric order of serialization or deserialization. + + + + Gets or sets the name of the underlying member or parameter. + + The name of the underlying member or parameter. + + + + Gets the that will get and set the during serialization. + + The that will get and set the during serialization. + + + + Gets or sets the for this property. + + The for this property. + + + + Gets or sets the type of the property. + + The type of the property. + + + + Gets or sets the for the property. + If set this converter takes presidence over the contract converter for the property type. + + The converter. + + + + Gets or sets the member converter. + + The member converter. + + + + Gets or sets a value indicating whether this is ignored. + + true if ignored; otherwise, false. + + + + Gets or sets a value indicating whether this is readable. + + true if readable; otherwise, false. + + + + Gets or sets a value indicating whether this is writable. + + true if writable; otherwise, false. + + + + Gets or sets a value indicating whether this has a member attribute. + + true if has a member attribute; otherwise, false. + + + + Gets the default value. + + The default value. + + + + Gets or sets a value indicating whether this is required. + + A value indicating whether this is required. + + + + Gets or sets a value indicating whether this property preserves object references. + + + true if this instance is reference; otherwise, false. + + + + + Gets or sets the property null value handling. + + The null value handling. + + + + Gets or sets the property default value handling. + + The default value handling. + + + + Gets or sets the property reference loop handling. + + The reference loop handling. + + + + Gets or sets the property object creation handling. + + The object creation handling. + + + + Gets or sets or sets the type name handling. + + The type name handling. + + + + Gets or sets a predicate used to determine whether the property should be serialize. + + A predicate used to determine whether the property should be serialize. + + + + Gets or sets a predicate used to determine whether the property should be serialized. + + A predicate used to determine whether the property should be serialized. + + + + Gets or sets an action used to set whether the property has been deserialized. + + An action used to set whether the property has been deserialized. + + + + Gets or sets the converter used when serializing the property's collection items. + + The collection's items converter. + + + + Gets or sets whether this property's collection items are serialized as a reference. + + Whether this property's collection items are serialized as a reference. + + + + Gets or sets the the type name handling used when serializing the property's collection items. + + The collection's items type name handling. + + + + Gets or sets the the reference loop handling used when serializing the property's collection items. + + The collection's items reference loop handling. + + + + A collection of objects. + + + + + Initializes a new instance of the class. + + The type. + + + + When implemented in a derived class, extracts the key from the specified element. + + The element from which to extract the key. + The key for the specified element. + + + + Adds a object. + + The property to add to the collection. + + + + Gets the closest matching object. + First attempts to get an exact case match of propertyName and then + a case insensitive match. + + Name of the property. + A matching property if found. + + + + Gets a property by property name. + + The name of the property to get. + Type property name string comparison. + A matching property if found. + + + + Contract details for a used by the . + + + + + Initializes a new instance of the class. + + The underlying type for the contract. + + + + Lookup and create an instance of the JsonConverter type described by the argument. + + The JsonConverter type to create. + Optional arguments to pass to an initializing constructor of the JsonConverter. + If null, the default constructor is used. + + + + Create a factory function that can be used to create instances of a JsonConverter described by the + argument type. The returned function can then be used to either invoke the converter's default ctor, or any + parameterized constructors by way of an object array. + + + + + Represents a trace writer that writes to memory. When the trace message limit is + reached then old trace messages will be removed as new messages are added. + + + + + Initializes a new instance of the class. + + + + + Writes the specified trace level, message and optional exception. + + The at which to write this trace. + The trace message. + The trace exception. This parameter is optional. + + + + Returns an enumeration of the most recent trace messages. + + An enumeration of the most recent trace messages. + + + + Returns a of the most recent trace messages. + + + A of the most recent trace messages. + + + + + Gets the that will be used to filter the trace messages passed to the writer. + For example a filter level of Info will exclude Verbose messages and include Info, + Warning and Error messages. + + + The that will be used to filter the trace messages passed to the writer. + + + + + Represents a method that constructs an object. + + The object type to create. + + + + When applied to a method, specifies that the method is called when an error occurs serializing an object. + + + + + Provides methods to get attributes from a , , or . + + + + + Initializes a new instance of the class. + + The instance to get attributes for. This parameter should be a , , or . + + + + Returns a collection of all of the attributes, or an empty collection if there are no attributes. + + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Returns a collection of attributes, identified by type, or an empty collection if there are no attributes. + + The type of the attributes. + When true, look up the hierarchy chain for the inherited custom attribute. + A collection of s, or an empty collection. + + + + Get and set values for a using reflection. + + + + + Initializes a new instance of the class. + + The member info. + + + + Sets the value. + + The target to set the value on. + The value to set on the target. + + + + Gets the value. + + The target to get the value from. + The value. + + + + Specifies how strings are escaped when writing JSON text. + + + + + Only control characters (e.g. newline) are escaped. + + + + + All non-ASCII and control characters (e.g. newline) are escaped. + + + + + HTML (<, >, &, ', ") and control characters (e.g. newline) are escaped. + + + + + Specifies what messages to output for the class. + + + + + Output no tracing and debugging messages. + + + + + Output error-handling messages. + + + + + Output warnings and error-handling messages. + + + + + Output informational messages, warnings, and error-handling messages. + + + + + Output all debugging and tracing messages. + + + + + Specifies type name handling options for the . + + + + + Do not include the .NET type name when serializing types. + + + + + Include the .NET type name when serializing into a JSON object structure. + + + + + Include the .NET type name when serializing into a JSON array structure. + + + + + Always include the .NET type name when serializing. + + + + + Include the .NET type name when the type of the object being serialized is not the same as its declared type. + + + + + Determines whether the collection is null or empty. + + The collection. + + true if the collection is null or empty; otherwise, false. + + + + + Adds the elements of the specified collection to the specified generic IList. + + The list to add to. + The collection of elements to add. + + + + Returns the index of the first occurrence in a sequence by using a specified IEqualityComparer{TSource}. + + The type of the elements of source. + A sequence in which to locate a value. + The object to locate in the sequence + An equality comparer to compare values. + The zero-based index of the first occurrence of value within the entire sequence, if found; otherwise, –1. + + + + Converts the value to the specified type. If the value is unable to be converted, the + value is checked whether it assignable to the specified type. + + The value to convert. + The culture to use when converting. + The type to convert or cast the value to. + + The converted type. If conversion was unsuccessful, the initial value + is returned if assignable to the target type. + + + + + Gets a dictionary of the names and values of an Enum type. + + + + + + Gets a dictionary of the names and values of an Enum type. + + The enum type to get names and values for. + + + + + Gets the type of the typed collection's items. + + The type. + The type of the typed collection's items. + + + + Gets the member's underlying type. + + The member. + The underlying type of the member. + + + + Determines whether the member is an indexed property. + + The member. + + true if the member is an indexed property; otherwise, false. + + + + + Determines whether the property is an indexed property. + + The property. + + true if the property is an indexed property; otherwise, false. + + + + + Gets the member's value on the object. + + The member. + The target object. + The member's value on the object. + + + + Sets the member's value on the target object. + + The member. + The target. + The value. + + + + Determines whether the specified MemberInfo can be read. + + The MemberInfo to determine whether can be read. + /// if set to true then allow the member to be gotten non-publicly. + + true if the specified MemberInfo can be read; otherwise, false. + + + + + Determines whether the specified MemberInfo can be set. + + The MemberInfo to determine whether can be set. + if set to true then allow the member to be set non-publicly. + if set to true then allow the member to be set if read-only. + + true if the specified MemberInfo can be set; otherwise, false. + + + + + Builds a string. Unlike StringBuilder this class lets you reuse it's internal buffer. + + + + + Determines whether the string is all white space. Empty string will return false. + + The string to test whether it is all white space. + + true if the string is all white space; otherwise, false. + + + + + Nulls an empty string. + + The string. + Null if the string was null, otherwise the string unchanged. + + + + Specifies the state of the . + + + + + An exception has been thrown, which has left the in an invalid state. + You may call the method to put the in the Closed state. + Any other method calls results in an being thrown. + + + + + The method has been called. + + + + + An object is being written. + + + + + A array is being written. + + + + + A constructor is being written. + + + + + A property is being written. + + + + + A write method has not been called. + + + + diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/contextmenu/jquery.contextMenu.css b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/contextmenu/jquery.contextMenu.css new file mode 100644 index 00000000..508e2461 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/contextmenu/jquery.contextMenu.css @@ -0,0 +1,287 @@ +@charset "UTF-8"; +/*! + * jQuery contextMenu - Plugin for simple contextMenu handling + * + * Version: v2.5.0 + * + * Authors: Björn Brala (SWIS.nl), Rodney Rehm, Addy Osmani (patches for FF) + * Web: http://swisnl.github.io/jQuery-contextMenu/ + * + * Copyright (c) 2011-2017 SWIS BV and contributors + * + * Licensed under + * MIT License http://www.opensource.org/licenses/mit-license + * + * Date: 2017-09-08T12:18:57.153Z + */ +@-webkit-keyframes cm-spin { + 0% { + -webkit-transform: translateY(-50%) rotate(0deg); + transform: translateY(-50%) rotate(0deg); + } + 100% { + -webkit-transform: translateY(-50%) rotate(359deg); + transform: translateY(-50%) rotate(359deg); + } +} +@-o-keyframes cm-spin { + 0% { + -webkit-transform: translateY(-50%) rotate(0deg); + -o-transform: translateY(-50%) rotate(0deg); + transform: translateY(-50%) rotate(0deg); + } + 100% { + -webkit-transform: translateY(-50%) rotate(359deg); + -o-transform: translateY(-50%) rotate(359deg); + transform: translateY(-50%) rotate(359deg); + } +} +@keyframes cm-spin { + 0% { + -webkit-transform: translateY(-50%) rotate(0deg); + -o-transform: translateY(-50%) rotate(0deg); + transform: translateY(-50%) rotate(0deg); + } + 100% { + -webkit-transform: translateY(-50%) rotate(359deg); + -o-transform: translateY(-50%) rotate(359deg); + transform: translateY(-50%) rotate(359deg); + } +} + +@font-face { + font-family: "context-menu-icons"; + font-style: normal; + font-weight: normal; + + src: url("font/context-menu-icons.eot?2u731"); + src: url("font/context-menu-icons.eot?2u731#iefix") format("embedded-opentype"), url("font/context-menu-icons.woff2?2u731") format("woff2"), url("font/context-menu-icons.woff?2u731") format("woff"), url("font/context-menu-icons.ttf?2u731") format("truetype"); +} + +.context-menu-icon-add:before { + content: "\EA01"; +} + +.context-menu-icon-copy:before { + content: "\EA02"; +} + +.context-menu-icon-cut:before { + content: "\EA03"; +} + +.context-menu-icon-delete:before { + content: "\EA04"; +} + +.context-menu-icon-edit:before { + content: "\EA05"; +} + +.context-menu-icon-loading:before { + content: "\EA06"; +} + +.context-menu-icon-paste:before { + content: "\EA07"; +} + +.context-menu-icon-quit:before { + content: "\EA08"; +} + +.context-menu-icon::before { + position: absolute; + top: 50%; + left: 0; + width: 2em; + font-family: "context-menu-icons"; + font-size: 1em; + font-style: normal; + font-weight: normal; + line-height: 1; + color: #2980b9; + text-align: center; + -webkit-transform: translateY(-50%); + -ms-transform: translateY(-50%); + -o-transform: translateY(-50%); + transform: translateY(-50%); + + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.context-menu-icon.context-menu-hover:before { + color: #fff; +} + +.context-menu-icon.context-menu-disabled::before { + color: #bbb; +} + +.context-menu-icon.context-menu-icon-loading:before { + -webkit-animation: cm-spin 2s infinite; + -o-animation: cm-spin 2s infinite; + animation: cm-spin 2s infinite; +} + +.context-menu-icon.context-menu-icon--fa { + display: list-item; + font-family: inherit; +} +.context-menu-icon.context-menu-icon--fa::before { + position: absolute; + top: 50%; + left: 0; + width: 2em; + font-family: FontAwesome; + font-size: 1em; + font-style: normal; + font-weight: normal; + line-height: 1; + color: #2980b9; + text-align: center; + -webkit-transform: translateY(-50%); + -ms-transform: translateY(-50%); + -o-transform: translateY(-50%); + transform: translateY(-50%); + + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.context-menu-icon.context-menu-icon--fa.context-menu-hover:before { + color: #fff; +} +.context-menu-icon.context-menu-icon--fa.context-menu-disabled::before { + color: #bbb; +} + +.context-menu-list { + position: absolute; + display: inline-block; + min-width: 13em; + max-width: 26em; + padding: .25em 0; + margin: .3em; + font-family: inherit; + font-size: inherit; + list-style-type: none; + background: #fff; + border: 1px solid #bebebe; + border-radius: .2em; + -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, .5); + box-shadow: 0 2px 5px rgba(0, 0, 0, .5); +} + +.context-menu-item { + position: relative; + padding: .2em 2em; + color: #2f2f2f; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-color: #fff; +} + +.context-menu-separator { + padding: 0; + margin: .35em 0; + border-bottom: 1px solid #e6e6e6; +} + +.context-menu-item > label > input, +.context-menu-item > label > textarea { + -webkit-user-select: text; + -moz-user-select: text; + -ms-user-select: text; + user-select: text; +} + +.context-menu-item.context-menu-hover { + color: #fff; + cursor: pointer; + background-color: #2980b9; +} + +.context-menu-item.context-menu-disabled { + color: #bbb; + cursor: default; + background-color: #fff; +} + +.context-menu-input.context-menu-hover { + color: #2f2f2f; + cursor: default; +} + +.context-menu-submenu:after { + position: absolute; + top: 50%; + right: .5em; + z-index: 1; + width: 0; + height: 0; + content: ''; + border-color: transparent transparent transparent #2f2f2f; + border-style: solid; + border-width: .25em 0 .25em .25em; + -webkit-transform: translateY(-50%); + -ms-transform: translateY(-50%); + -o-transform: translateY(-50%); + transform: translateY(-50%); +} + +/** + * Inputs + */ +.context-menu-item.context-menu-input { + padding: .3em .6em; +} + +/* vertically align inside labels */ +.context-menu-input > label > * { + vertical-align: top; +} + +/* position checkboxes and radios as icons */ +.context-menu-input > label > input[type="checkbox"], +.context-menu-input > label > input[type="radio"] { + position: relative; + top: .12em; + margin-right: .4em; +} + +.context-menu-input > label { + margin: 0; +} + +.context-menu-input > label, +.context-menu-input > label > input[type="text"], +.context-menu-input > label > textarea, +.context-menu-input > label > select { + display: block; + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.context-menu-input > label > textarea { + height: 7em; +} + +.context-menu-item > .context-menu-list { + top: .3em; + /* re-positioned by js */ + right: -.3em; + display: none; +} + +.context-menu-item.context-menu-visible > .context-menu-list { + display: block; +} + +.context-menu-accesskey { + text-decoration: underline; +} diff --git a/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/contextmenu/jquery.contextMenu.js b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/contextmenu/jquery.contextMenu.js new file mode 100644 index 00000000..6cebfbc4 --- /dev/null +++ b/src/main/resources/static/CrossUploader/NamoCrossUploaderH5Samples/Samples/app/lib/contextmenu/jquery.contextMenu.js @@ -0,0 +1,2054 @@ +/** + * jQuery contextMenu v2.5.0 - Plugin for simple contextMenu handling + * + * Version: v2.5.0 + * + * Authors: Björn Brala (SWIS.nl), Rodney Rehm, Addy Osmani (patches for FF) + * Web: http://swisnl.github.io/jQuery-contextMenu/ + * + * Copyright (c) 2011-2017 SWIS BV and contributors + * + * Licensed under + * MIT License http://www.opensource.org/licenses/mit-license + * + * Date: 2017-08-30T12:41:32.950Z + */ + +// jscs:disable +/* jshint ignore:start */ +(function (factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as anonymous module. + define(['jquery'], factory); + } else if (typeof exports === 'object') { + // Node / CommonJS + factory(require('jquery')); + } else { + // Browser globals. + factory(jQuery); + } +})(function ($) { + + 'use strict'; + + // TODO: - + // ARIA stuff: menuitem, menuitemcheckbox und menuitemradio + // create structure if $.support[htmlCommand || htmlMenuitem] and !opt.disableNative + + // determine html5 compatibility + $.support.htmlMenuitem = ('HTMLMenuItemElement' in window); + $.support.htmlCommand = ('HTMLCommandElement' in window); + $.support.eventSelectstart = ('onselectstart' in document.documentElement); + /* // should the need arise, test for css user-select + $.support.cssUserSelect = (function(){ + var t = false, + e = document.createElement('div'); + + $.each('Moz|Webkit|Khtml|O|ms|Icab|'.split('|'), function(i, prefix) { + var propCC = prefix + (prefix ? 'U' : 'u') + 'serSelect', + prop = (prefix ? ('-' + prefix.toLowerCase() + '-') : '') + 'user-select'; + + e.style.cssText = prop + ': text;'; + if (e.style[propCC] == 'text') { + t = true; + return false; + } + + return true; + }); + + return t; + })(); + */ + + + if (!$.ui || !$.widget) { + // duck punch $.cleanData like jQueryUI does to get that remove event + $.cleanData = (function (orig) { + return function (elems) { + var events, elem, i; + for (i = 0; elems[i] != null; i++) { + elem = elems[i]; + try { + // Only trigger remove when necessary to save time + events = $._data(elem, 'events'); + if (events && events.remove) { + $(elem).triggerHandler('remove'); + } + + // Http://bugs.jquery.com/ticket/8235 + } catch (e) { + } + } + orig(elems); + }; + })($.cleanData); + } + /* jshint ignore:end */ + // jscs:enable + + var // currently active contextMenu trigger + $currentTrigger = null, + // is contextMenu initialized with at least one menu? + initialized = false, + // window handle + $win = $(window), + // number of registered menus + counter = 0, + // mapping selector to namespace + namespaces = {}, + // mapping namespace to options + menus = {}, + // custom command type handlers + types = {}, + // default values + defaults = { + // selector of contextMenu trigger + selector: null, + // where to append the menu to + appendTo: null, + // method to trigger context menu ["right", "left", "hover"] + trigger: 'right', + // hide menu when mouse leaves trigger / menu elements + autoHide: false, + // ms to wait before showing a hover-triggered context menu + delay: 200, + // flag denoting if a second trigger should simply move (true) or rebuild (false) an open menu + // as long as the trigger happened on one of the trigger-element's child nodes + reposition: true, + + //ability to select submenu + selectableSubMenu: false, + + // Default classname configuration to be able avoid conflicts in frameworks + classNames: { + hover: 'context-menu-hover', // Item hover + disabled: 'context-menu-disabled', // Item disabled + visible: 'context-menu-visible', // Item visible + notSelectable: 'context-menu-not-selectable', // Item not selectable + + icon: 'context-menu-icon', + iconEdit: 'context-menu-icon-edit', + iconCut: 'context-menu-icon-cut', + iconCopy: 'context-menu-icon-copy', + iconPaste: 'context-menu-icon-paste', + iconDelete: 'context-menu-icon-delete', + iconAdd: 'context-menu-icon-add', + iconQuit: 'context-menu-icon-quit', + iconLoadingClass: 'context-menu-icon-loading' + }, + + // determine position to show menu at + determinePosition: function ($menu) { + // position to the lower middle of the trigger element + if ($.ui && $.ui.position) { + // .position() is provided as a jQuery UI utility + // (...and it won't work on hidden elements) + $menu.css('display', 'block').position({ + my: 'center top', + at: 'center bottom', + of: this, + offset: '0 5', + collision: 'fit' + }).css('display', 'none'); + } else { + // determine contextMenu position + var offset = this.offset(); + offset.top += this.outerHeight(); + offset.left += this.outerWidth() / 2 - $menu.outerWidth() / 2; + $menu.css(offset); + } + }, + // position menu + position: function (opt, x, y) { + var offset; + // determine contextMenu position + if (!x && !y) { + opt.determinePosition.call(this, opt.$menu); + return; + } else if (x === 'maintain' && y === 'maintain') { + // x and y must not be changed (after re-show on command click) + offset = opt.$menu.position(); + } else { + // x and y are given (by mouse event) + var offsetParentOffset = opt.$menu.offsetParent().offset(); + offset = {top: y - offsetParentOffset.top, left: x -offsetParentOffset.left}; + } + + // correct offset if viewport demands it + var bottom = $win.scrollTop() + $win.height(), + right = $win.scrollLeft() + $win.width(), + height = opt.$menu.outerHeight(), + width = opt.$menu.outerWidth(); + + if (offset.top + height > bottom) { + offset.top -= height; + } + + if (offset.top < 0) { + offset.top = 0; + } + + if (offset.left + width > right) { + offset.left -= width; + } + + if (offset.left < 0) { + offset.left = 0; + } + + opt.$menu.css(offset); + }, + // position the sub-menu + positionSubmenu: function ($menu) { + if (typeof $menu === 'undefined') { + // When user hovers over item (which has sub items) handle.focusItem will call this. + // but the submenu does not exist yet if opt.items is a promise. just return, will + // call positionSubmenu after promise is completed. + return; + } + if ($.ui && $.ui.position) { + // .position() is provided as a jQuery UI utility + // (...and it won't work on hidden elements) + $menu.css('display', 'block').position({ + my: 'left top-5', + at: 'right top', + of: this, + collision: 'flipfit fit' + }).css('display', ''); + } else { + // determine contextMenu position + var offset = { + top: -9, + left: this.outerWidth() - 5 + }; + $menu.css(offset); + } + }, + // offset to add to zIndex + zIndex: 1, + // show hide animation settings + animation: { + duration: 50, + show: 'slideDown', + hide: 'slideUp' + }, + // events + events: { + show: $.noop, + hide: $.noop + }, + // default callback + callback: null, + // list of contextMenu items + items: {} + }, + // mouse position for hover activation + hoveract = { + timer: null, + pageX: null, + pageY: null + }, + // determine zIndex + zindex = function ($t) { + var zin = 0, + $tt = $t; + + while (true) { + zin = Math.max(zin, parseInt($tt.css('z-index'), 10) || 0); + $tt = $tt.parent(); + if (!$tt || !$tt.length || 'html body'.indexOf($tt.prop('nodeName').toLowerCase()) > -1) { + break; + } + } + return zin; + }, + // event handlers + handle = { + // abort anything + abortevent: function (e) { + e.preventDefault(); + e.stopImmediatePropagation(); + }, + // contextmenu show dispatcher + contextmenu: function (e) { + var $this = $(this); + + // disable actual context-menu if we are using the right mouse button as the trigger + if (e.data.trigger === 'right') { + e.preventDefault(); + e.stopImmediatePropagation(); + } + + // abort native-triggered events unless we're triggering on right click + if ((e.data.trigger !== 'right' && e.data.trigger !== 'demand') && e.originalEvent) { + return; + } + + // Let the current contextmenu decide if it should show or not based on its own trigger settings + if (typeof e.mouseButton !== 'undefined' && e.data) { + if (!(e.data.trigger === 'left' && e.mouseButton === 0) && !(e.data.trigger === 'right' && e.mouseButton === 2)) { + // Mouse click is not valid. + return; + } + } + + // abort event if menu is visible for this trigger + if ($this.hasClass('context-menu-active')) { + return; + } + + if (!$this.hasClass('context-menu-disabled')) { + // theoretically need to fire a show event at + // http://www.whatwg.org/specs/web-apps/current-work/multipage/interactive-elements.html#context-menus + // var evt = jQuery.Event("show", { data: data, pageX: e.pageX, pageY: e.pageY, relatedTarget: this }); + // e.data.$menu.trigger(evt); + + $currentTrigger = $this; + if (e.data.build) { + var built = e.data.build($currentTrigger, e); + // abort if build() returned false + if (built === false) { + return; + } + + // dynamically build menu on invocation + e.data = $.extend(true, {}, defaults, e.data, built || {}); + + // abort if there are no items to display + if (!e.data.items || $.isEmptyObject(e.data.items)) { + // Note: jQuery captures and ignores errors from event handlers + if (window.console) { + (console.error || console.log).call(console, 'No items specified to show in contextMenu'); + } + + throw new Error('No Items specified'); + } + + // backreference for custom command type creation + e.data.$trigger = $currentTrigger; + + op.create(e.data); + } + var showMenu = false; + for (var item in e.data.items) { + if (e.data.items.hasOwnProperty(item)) { + var visible; + if ($.isFunction(e.data.items[item].visible)) { + visible = e.data.items[item].visible.call($(e.currentTarget), item, e.data); + } else if (typeof e.data.items[item] !== 'undefined' && e.data.items[item].visible) { + visible = e.data.items[item].visible === true; + } else { + visible = true; + } + if (visible) { + showMenu = true; + } + } + } + if (showMenu) { + // show menu + op.show.call($this, e.data, e.pageX, e.pageY); + } + } + }, + // contextMenu left-click trigger + click: function (e) { + e.preventDefault(); + e.stopImmediatePropagation(); + $(this).trigger($.Event('contextmenu', {data: e.data, pageX: e.pageX, pageY: e.pageY})); + }, + // contextMenu right-click trigger + mousedown: function (e) { + // register mouse down + var $this = $(this); + + // hide any previous menus + if ($currentTrigger && $currentTrigger.length && !$currentTrigger.is($this)) { + $currentTrigger.data('contextMenu').$menu.trigger('contextmenu:hide'); + } + + // activate on right click + if (e.button === 2) { + $currentTrigger = $this.data('contextMenuActive', true); + } + }, + // contextMenu right-click trigger + mouseup: function (e) { + // show menu + var $this = $(this); + if ($this.data('contextMenuActive') && $currentTrigger && $currentTrigger.length && $currentTrigger.is($this) && !$this.hasClass('context-menu-disabled')) { + e.preventDefault(); + e.stopImmediatePropagation(); + $currentTrigger = $this; + $this.trigger($.Event('contextmenu', {data: e.data, pageX: e.pageX, pageY: e.pageY})); + } + + $this.removeData('contextMenuActive'); + }, + // contextMenu hover trigger + mouseenter: function (e) { + var $this = $(this), + $related = $(e.relatedTarget), + $document = $(document); + + // abort if we're coming from a menu + if ($related.is('.context-menu-list') || $related.closest('.context-menu-list').length) { + return; + } + + // abort if a menu is shown + if ($currentTrigger && $currentTrigger.length) { + return; + } + + hoveract.pageX = e.pageX; + hoveract.pageY = e.pageY; + hoveract.data = e.data; + $document.on('mousemove.contextMenuShow', handle.mousemove); + hoveract.timer = setTimeout(function () { + hoveract.timer = null; + $document.off('mousemove.contextMenuShow'); + $currentTrigger = $this; + $this.trigger($.Event('contextmenu', { + data: hoveract.data, + pageX: hoveract.pageX, + pageY: hoveract.pageY + })); + }, e.data.delay); + }, + // contextMenu hover trigger + mousemove: function (e) { + hoveract.pageX = e.pageX; + hoveract.pageY = e.pageY; + }, + // contextMenu hover trigger + mouseleave: function (e) { + // abort if we're leaving for a menu + var $related = $(e.relatedTarget); + if ($related.is('.context-menu-list') || $related.closest('.context-menu-list').length) { + return; + } + + try { + clearTimeout(hoveract.timer); + } catch (e) { + } + + hoveract.timer = null; + }, + // click on layer to hide contextMenu + layerClick: function (e) { + var $this = $(this), + root = $this.data('contextMenuRoot'), + button = e.button, + x = e.pageX, + y = e.pageY, + target, + offset; + + e.preventDefault(); + + setTimeout(function () { + var $window; + var triggerAction = ((root.trigger === 'left' && button === 0) || (root.trigger === 'right' && button === 2)); + + // find the element that would've been clicked, wasn't the layer in the way + if (document.elementFromPoint && root.$layer) { + root.$layer.hide(); + target = document.elementFromPoint(x - $win.scrollLeft(), y - $win.scrollTop()); + + // also need to try and focus this element if we're in a contenteditable area, + // as the layer will prevent the browser mouse action we want + if (target.isContentEditable) { + var range = document.createRange(), + sel = window.getSelection(); + range.selectNode(target); + range.collapse(true); + sel.removeAllRanges(); + sel.addRange(range); + } + $(target).trigger(e); + root.$layer.show(); + } + + if (root.reposition && triggerAction) { + if (document.elementFromPoint) { + if (root.$trigger.is(target)) { + root.position.call(root.$trigger, root, x, y); + return; + } + } else { + offset = root.$trigger.offset(); + $window = $(window); + // while this looks kinda awful, it's the best way to avoid + // unnecessarily calculating any positions + offset.top += $window.scrollTop(); + if (offset.top <= e.pageY) { + offset.left += $window.scrollLeft(); + if (offset.left <= e.pageX) { + offset.bottom = offset.top + root.$trigger.outerHeight(); + if (offset.bottom >= e.pageY) { + offset.right = offset.left + root.$trigger.outerWidth(); + if (offset.right >= e.pageX) { + // reposition + root.position.call(root.$trigger, root, x, y); + return; + } + } + } + } + } + } + + if (target && triggerAction) { + root.$trigger.one('contextmenu:hidden', function () { + $(target).contextMenu({x: x, y: y, button: button}); + }); + } + + if (root !== null && typeof root !== 'undefined' && root.$menu !== null && typeof root.$menu !== 'undefined') { + root.$menu.trigger('contextmenu:hide'); + } + }, 50); + }, + // key handled :hover + keyStop: function (e, opt) { + if (!opt.isInput) { + e.preventDefault(); + } + + e.stopPropagation(); + }, + key: function (e) { + + var opt = {}; + + // Only get the data from $currentTrigger if it exists + if ($currentTrigger) { + opt = $currentTrigger.data('contextMenu') || {}; + } + // If the trigger happen on a element that are above the contextmenu do this + if (typeof opt.zIndex === 'undefined') { + opt.zIndex = 0; + } + var targetZIndex = 0; + var getZIndexOfTriggerTarget = function (target) { + if (target.style.zIndex !== '') { + targetZIndex = target.style.zIndex; + } else { + if (target.offsetParent !== null && typeof target.offsetParent !== 'undefined') { + getZIndexOfTriggerTarget(target.offsetParent); + } + else if (target.parentElement !== null && typeof target.parentElement !== 'undefined') { + getZIndexOfTriggerTarget(target.parentElement); + } + } + }; + getZIndexOfTriggerTarget(e.target); + // If targetZIndex is heigher then opt.zIndex dont progress any futher. + // This is used to make sure that if you are using a dialog with a input / textarea / contenteditable div + // and its above the contextmenu it wont steal keys events + if (opt.$menu && parseInt(targetZIndex,10) > parseInt(opt.$menu.css("zIndex"),10)) { + return; + } + switch (e.keyCode) { + case 9: + case 38: // up + handle.keyStop(e, opt); + // if keyCode is [38 (up)] or [9 (tab) with shift] + if (opt.isInput) { + if (e.keyCode === 9 && e.shiftKey) { + e.preventDefault(); + if (opt.$selected) { + opt.$selected.find('input, textarea, select').blur(); + } + if (opt.$menu !== null && typeof opt.$menu !== 'undefined') { + opt.$menu.trigger('prevcommand'); + } + return; + } else if (e.keyCode === 38 && opt.$selected.find('input, textarea, select').prop('type') === 'checkbox') { + // checkboxes don't capture this key + e.preventDefault(); + return; + } + } else if (e.keyCode !== 9 || e.shiftKey) { + if (opt.$menu !== null && typeof opt.$menu !== 'undefined') { + opt.$menu.trigger('prevcommand'); + } + return; + } + break; + // omitting break; + // case 9: // tab - reached through omitted break; + case 40: // down + handle.keyStop(e, opt); + if (opt.isInput) { + if (e.keyCode === 9) { + e.preventDefault(); + if (opt.$selected) { + opt.$selected.find('input, textarea, select').blur(); + } + if (opt.$menu !== null && typeof opt.$menu !== 'undefined') { + opt.$menu.trigger('nextcommand'); + } + return; + } else if (e.keyCode === 40 && opt.$selected.find('input, textarea, select').prop('type') === 'checkbox') { + // checkboxes don't capture this key + e.preventDefault(); + return; + } + } else { + if (opt.$menu !== null && typeof opt.$menu !== 'undefined') { + opt.$menu.trigger('nextcommand'); + } + return; + } + break; + + case 37: // left + handle.keyStop(e, opt); + if (opt.isInput || !opt.$selected || !opt.$selected.length) { + break; + } + + if (!opt.$selected.parent().hasClass('context-menu-root')) { + var $parent = opt.$selected.parent().parent(); + opt.$selected.trigger('contextmenu:blur'); + opt.$selected = $parent; + return; + } + break; + + case 39: // right + handle.keyStop(e, opt); + if (opt.isInput || !opt.$selected || !opt.$selected.length) { + break; + } + + var itemdata = opt.$selected.data('contextMenu') || {}; + if (itemdata.$menu && opt.$selected.hasClass('context-menu-submenu')) { + opt.$selected = null; + itemdata.$selected = null; + itemdata.$menu.trigger('nextcommand'); + return; + } + break; + + case 35: // end + case 36: // home + if (opt.$selected && opt.$selected.find('input, textarea, select').length) { + return; + } else { + (opt.$selected && opt.$selected.parent() || opt.$menu) + .children(':not(.' + opt.classNames.disabled + ', .' + opt.classNames.notSelectable + ')')[e.keyCode === 36 ? 'first' : 'last']() + .trigger('contextmenu:focus'); + e.preventDefault(); + return; + } + break; + + case 13: // enter + handle.keyStop(e, opt); + if (opt.isInput) { + if (opt.$selected && !opt.$selected.is('textarea, select')) { + e.preventDefault(); + return; + } + break; + } + if (typeof opt.$selected !== 'undefined' && opt.$selected !== null) { + opt.$selected.trigger('mouseup'); + } + return; + + case 32: // space + case 33: // page up + case 34: // page down + // prevent browser from scrolling down while menu is visible + handle.keyStop(e, opt); + return; + + case 27: // esc + handle.keyStop(e, opt); + if (opt.$menu !== null && typeof opt.$menu !== 'undefined') { + opt.$menu.trigger('contextmenu:hide'); + } + return; + + default: // 0-9, a-z + var k = (String.fromCharCode(e.keyCode)).toUpperCase(); + if (opt.accesskeys && opt.accesskeys[k]) { + // according to the specs accesskeys must be invoked immediately + opt.accesskeys[k].$node.trigger(opt.accesskeys[k].$menu ? 'contextmenu:focus' : 'mouseup'); + return; + } + break; + } + // pass event to selected item, + // stop propagation to avoid endless recursion + e.stopPropagation(); + if (typeof opt.$selected !== 'undefined' && opt.$selected !== null) { + opt.$selected.trigger(e); + } + }, + // select previous possible command in menu + prevItem: function (e) { + e.stopPropagation(); + var opt = $(this).data('contextMenu') || {}; + var root = $(this).data('contextMenuRoot') || {}; + + // obtain currently selected menu + if (opt.$selected) { + var $s = opt.$selected; + opt = opt.$selected.parent().data('contextMenu') || {}; + opt.$selected = $s; + } + + var $children = opt.$menu.children(), + $prev = !opt.$selected || !opt.$selected.prev().length ? $children.last() : opt.$selected.prev(), + $round = $prev; + + // skip disabled or hidden elements + while ($prev.hasClass(root.classNames.disabled) || $prev.hasClass(root.classNames.notSelectable) || $prev.is(':hidden')) { + if ($prev.prev().length) { + $prev = $prev.prev(); + } else { + $prev = $children.last(); + } + if ($prev.is($round)) { + // break endless loop + return; + } + } + + // leave current + if (opt.$selected) { + handle.itemMouseleave.call(opt.$selected.get(0), e); + } + + // activate next + handle.itemMouseenter.call($prev.get(0), e); + + // focus input + var $input = $prev.find('input, textarea, select'); + if ($input.length) { + $input.focus(); + } + }, + // select next possible command in menu + nextItem: function (e) { + e.stopPropagation(); + var opt = $(this).data('contextMenu') || {}; + var root = $(this).data('contextMenuRoot') || {}; + + // obtain currently selected menu + if (opt.$selected) { + var $s = opt.$selected; + opt = opt.$selected.parent().data('contextMenu') || {}; + opt.$selected = $s; + } + + var $children = opt.$menu.children(), + $next = !opt.$selected || !opt.$selected.next().length ? $children.first() : opt.$selected.next(), + $round = $next; + + // skip disabled + while ($next.hasClass(root.classNames.disabled) || $next.hasClass(root.classNames.notSelectable) || $next.is(':hidden')) { + if ($next.next().length) { + $next = $next.next(); + } else { + $next = $children.first(); + } + if ($next.is($round)) { + // break endless loop + return; + } + } + + // leave current + if (opt.$selected) { + handle.itemMouseleave.call(opt.$selected.get(0), e); + } + + // activate next + handle.itemMouseenter.call($next.get(0), e); + + // focus input + var $input = $next.find('input, textarea, select'); + if ($input.length) { + $input.focus(); + } + }, + // flag that we're inside an input so the key handler can act accordingly + focusInput: function () { + var $this = $(this).closest('.context-menu-item'), + data = $this.data(), + opt = data.contextMenu, + root = data.contextMenuRoot; + + root.$selected = opt.$selected = $this; + root.isInput = opt.isInput = true; + }, + // flag that we're inside an input so the key handler can act accordingly + blurInput: function () { + var $this = $(this).closest('.context-menu-item'), + data = $this.data(), + opt = data.contextMenu, + root = data.contextMenuRoot; + + root.isInput = opt.isInput = false; + }, + // :hover on menu + menuMouseenter: function () { + var root = $(this).data().contextMenuRoot; + root.hovering = true; + }, + // :hover on menu + menuMouseleave: function (e) { + var root = $(this).data().contextMenuRoot; + if (root.$layer && root.$layer.is(e.relatedTarget)) { + root.hovering = false; + } + }, + // :hover done manually so key handling is possible + itemMouseenter: function (e) { + var $this = $(this), + data = $this.data(), + opt = data.contextMenu, + root = data.contextMenuRoot; + + root.hovering = true; + + // abort if we're re-entering + if (e && root.$layer && root.$layer.is(e.relatedTarget)) { + e.preventDefault(); + e.stopImmediatePropagation(); + } + + // make sure only one item is selected + (opt.$menu ? opt : root).$menu + .children('.' + root.classNames.hover).trigger('contextmenu:blur') + .children('.hover').trigger('contextmenu:blur'); + + if ($this.hasClass(root.classNames.disabled) || $this.hasClass(root.classNames.notSelectable)) { + opt.$selected = null; + return; + } + + + $this.trigger('contextmenu:focus'); + }, + // :hover done manually so key handling is possible + itemMouseleave: function (e) { + var $this = $(this), + data = $this.data(), + opt = data.contextMenu, + root = data.contextMenuRoot; + + if (root !== opt && root.$layer && root.$layer.is(e.relatedTarget)) { + if (typeof root.$selected !== 'undefined' && root.$selected !== null) { + root.$selected.trigger('contextmenu:blur'); + } + e.preventDefault(); + e.stopImmediatePropagation(); + root.$selected = opt.$selected = opt.$node; + return; + } + + if(opt && opt.$menu && opt.$menu.hasClass('context-menu-visible')){ + return; + } + + $this.trigger('contextmenu:blur'); + }, + // contextMenu item click + itemClick: function (e) { + var $this = $(this), + data = $this.data(), + opt = data.contextMenu, + root = data.contextMenuRoot, + key = data.contextMenuKey, + callback; + + // abort if the key is unknown or disabled or is a menu + if (!opt.items[key] || $this.is('.' + root.classNames.disabled + ', .context-menu-separator, .' + root.classNames.notSelectable) || ($this.is('.context-menu-submenu') && root.selectableSubMenu === false )) { + return; + } + + e.preventDefault(); + e.stopImmediatePropagation(); + + if ($.isFunction(opt.callbacks[key]) && Object.prototype.hasOwnProperty.call(opt.callbacks, key)) { + // item-specific callback + callback = opt.callbacks[key]; + } else if ($.isFunction(root.callback)) { + // default callback + callback = root.callback; + } else { + // no callback, no action + return; + } + + // hide menu if callback doesn't stop that + if (callback.call(root.$trigger, key, root, e) !== false) { + root.$menu.trigger('contextmenu:hide'); + } else if (root.$menu.parent().length) { + op.update.call(root.$trigger, root); + } + }, + // ignore click events on input elements + inputClick: function (e) { + e.stopImmediatePropagation(); + }, + // hide + hideMenu: function (e, data) { + var root = $(this).data('contextMenuRoot'); + op.hide.call(root.$trigger, root, data && data.force); + }, + // focus + focusItem: function (e) { + e.stopPropagation(); + var $this = $(this), + data = $this.data(), + opt = data.contextMenu, + root = data.contextMenuRoot; + + if ($this.hasClass(root.classNames.disabled) || $this.hasClass(root.classNames.notSelectable)) { + return; + } + + $this + .addClass([root.classNames.hover, root.classNames.visible].join(' ')) + // select other items and included items + .parent().find('.context-menu-item').not($this) + .removeClass(root.classNames.visible) + .filter('.' + root.classNames.hover) + .trigger('contextmenu:blur'); + + // remember selected + opt.$selected = root.$selected = $this; + + + if(opt && opt.$node && opt.$node.hasClass('context-menu-submenu')){ + opt.$node.addClass(root.classNames.hover); + } + + // position sub-menu - do after show so dumb $.ui.position can keep up + if (opt.$node) { + root.positionSubmenu.call(opt.$node, opt.$menu); + } + }, + // blur + blurItem: function (e) { + e.stopPropagation(); + var $this = $(this), + data = $this.data(), + opt = data.contextMenu, + root = data.contextMenuRoot; + + if (opt.autoHide) { // for tablets and touch screens this needs to remain + $this.removeClass(root.classNames.visible); + } + $this.removeClass(root.classNames.hover); + opt.$selected = null; + } + }, + // operations + op = { + show: function (opt, x, y) { + var $trigger = $(this), + css = {}; + + // hide any open menus + $('#context-menu-layer').trigger('mousedown'); + + // backreference for callbacks + opt.$trigger = $trigger; + + // show event + if (opt.events.show.call($trigger, opt) === false) { + $currentTrigger = null; + return; + } + + // create or update context menu + op.update.call($trigger, opt); + + // position menu + opt.position.call($trigger, opt, x, y); + + // make sure we're in front + if (opt.zIndex) { + var additionalZValue = opt.zIndex; + // If opt.zIndex is a function, call the function to get the right zIndex. + if (typeof opt.zIndex === 'function') { + additionalZValue = opt.zIndex.call($trigger, opt); + } + css.zIndex = zindex($trigger) + additionalZValue; + } + + // add layer + op.layer.call(opt.$menu, opt, css.zIndex); + + // adjust sub-menu zIndexes + opt.$menu.find('ul').css('zIndex', css.zIndex + 1); + + // position and show context menu + opt.$menu.css(css)[opt.animation.show](opt.animation.duration, function () { + $trigger.trigger('contextmenu:visible'); + }); + // make options available and set state + $trigger + .data('contextMenu', opt) + .addClass('context-menu-active'); + + // register key handler + $(document).off('keydown.contextMenu').on('keydown.contextMenu', handle.key); + // register autoHide handler + if (opt.autoHide) { + // mouse position handler + $(document).on('mousemove.contextMenuAutoHide', function (e) { + // need to capture the offset on mousemove, + // since the page might've been scrolled since activation + var pos = $trigger.offset(); + pos.right = pos.left + $trigger.outerWidth(); + pos.bottom = pos.top + $trigger.outerHeight(); + + if (opt.$layer && !opt.hovering && (!(e.pageX >= pos.left && e.pageX <= pos.right) || !(e.pageY >= pos.top && e.pageY <= pos.bottom))) { + /* Additional hover check after short time, you might just miss the edge of the menu */ + setTimeout(function () { + if (!opt.hovering && opt.$menu !== null && typeof opt.$menu !== 'undefined') { + opt.$menu.trigger('contextmenu:hide'); + } + }, 50); + } + }); + } + }, + hide: function (opt, force) { + var $trigger = $(this); + if (!opt) { + opt = $trigger.data('contextMenu') || {}; + } + + // hide event + if (!force && opt.events && opt.events.hide.call($trigger, opt) === false) { + return; + } + + // remove options and revert state + $trigger + .removeData('contextMenu') + .removeClass('context-menu-active'); + + if (opt.$layer) { + // keep layer for a bit so the contextmenu event can be aborted properly by opera + setTimeout((function ($layer) { + return function () { + $layer.remove(); + }; + })(opt.$layer), 10); + + try { + delete opt.$layer; + } catch (e) { + opt.$layer = null; + } + } + + // remove handle + $currentTrigger = null; + // remove selected + opt.$menu.find('.' + opt.classNames.hover).trigger('contextmenu:blur'); + opt.$selected = null; + // collapse all submenus + opt.$menu.find('.' + opt.classNames.visible).removeClass(opt.classNames.visible); + // unregister key and mouse handlers + // $(document).off('.contextMenuAutoHide keydown.contextMenu'); // http://bugs.jquery.com/ticket/10705 + $(document).off('.contextMenuAutoHide').off('keydown.contextMenu'); + // hide menu + if (opt.$menu) { + opt.$menu[opt.animation.hide](opt.animation.duration, function () { + // tear down dynamically built menu after animation is completed. + if (opt.build) { + opt.$menu.remove(); + $.each(opt, function (key) { + switch (key) { + case 'ns': + case 'selector': + case 'build': + case 'trigger': + return true; + + default: + opt[key] = undefined; + try { + delete opt[key]; + } catch (e) { + } + return true; + } + }); + } + + setTimeout(function () { + $trigger.trigger('contextmenu:hidden'); + }, 10); + }); + } + }, + create: function (opt, root) { + if (typeof root === 'undefined') { + root = opt; + } + + // create contextMenu + opt.$menu = $('
    ').addClass(opt.className || '').data({ + 'contextMenu': opt, + 'contextMenuRoot': root + }); + + $.each(['callbacks', 'commands', 'inputs'], function (i, k) { + opt[k] = {}; + if (!root[k]) { + root[k] = {}; + } + }); + + if (!root.accesskeys) { + root.accesskeys = {}; + } + + function createNameNode(item) { + var $name = $(''); + if (item._accesskey) { + if (item._beforeAccesskey) { + $name.append(document.createTextNode(item._beforeAccesskey)); + } + $('') + .addClass('context-menu-accesskey') + .text(item._accesskey) + .appendTo($name); + if (item._afterAccesskey) { + $name.append(document.createTextNode(item._afterAccesskey)); + } + } else { + if (item.isHtmlName) { + // restrict use with access keys + if (typeof item.accesskey !== 'undefined') { + throw new Error('accesskeys are not compatible with HTML names and cannot be used together in the same item'); + } + $name.html(item.name); + } else { + $name.text(item.name); + } + } + return $name; + } + + // create contextMenu items + $.each(opt.items, function (key, item) { + var $t = $('
  • ').addClass(item.className || ''), + $label = null, + $input = null; + + // iOS needs to see a click-event bound to an element to actually + // have the TouchEvents infrastructure trigger the click event + $t.on('click', $.noop); + + // Make old school string seperator a real item so checks wont be + // akward later. + // And normalize 'cm_separator' into 'cm_seperator'. + if (typeof item === 'string' || item.type === 'cm_separator') { + item = {type: 'cm_seperator'}; + } + + item.$node = $t.data({ + 'contextMenu': opt, + 'contextMenuRoot': root, + 'contextMenuKey': key + }); + + // register accesskey + // NOTE: the accesskey attribute should be applicable to any element, but Safari5 and Chrome13 still can't do that + if (typeof item.accesskey !== 'undefined') { + var aks = splitAccesskey(item.accesskey); + for (var i = 0, ak; ak = aks[i]; i++) { + if (!root.accesskeys[ak]) { + root.accesskeys[ak] = item; + var matched = item.name.match(new RegExp('^(.*?)(' + ak + ')(.*)$', 'i')); + if (matched) { + item._beforeAccesskey = matched[1]; + item._accesskey = matched[2]; + item._afterAccesskey = matched[3]; + } + break; + } + } + } + + if (item.type && types[item.type]) { + // run custom type handler + types[item.type].call($t, item, opt, root); + // register commands + $.each([opt, root], function (i, k) { + k.commands[key] = item; + // Overwrite only if undefined or the item is appended to the root. This so it + // doesn't overwrite callbacks of root elements if the name is the same. + if ($.isFunction(item.callback) && (typeof k.callbacks[key] === 'undefined' || typeof opt.type === 'undefined')) { + k.callbacks[key] = item.callback; + } + }); + } else { + // add label for input + if (item.type === 'cm_seperator') { + $t.addClass('context-menu-separator ' + root.classNames.notSelectable); + } else if (item.type === 'html') { + $t.addClass('context-menu-html ' + root.classNames.notSelectable); + } else if (item.type === 'sub') { + // We don't want to execute the next else-if if it is a sub. + } else if (item.type) { + $label = $('').appendTo($t); + createNameNode(item).appendTo($label); + + $t.addClass('context-menu-input'); + opt.hasTypes = true; + $.each([opt, root], function (i, k) { + k.commands[key] = item; + k.inputs[key] = item; + }); + } else if (item.items) { + item.type = 'sub'; + } + + switch (item.type) { + case 'cm_seperator': + break; + + case 'text': + $input = $('') + .attr('name', 'context-menu-input-' + key) + .val(item.value || '') + .appendTo($label); + break; + + case 'textarea': + $input = $('') + .attr('name', 'context-menu-input-' + key) + .val(item.value || '') + .appendTo($label); + + if (item.height) { + $input.height(item.height); + } + break; + + case 'checkbox': + $input = $('') + .attr('name', 'context-menu-input-' + key) + .val(item.value || '') + .prop('checked', !!item.selected) + .prependTo($label); + break; + + case 'radio': + $input = $('') + .attr('name', 'context-menu-input-' + item.radio) + .val(item.value || '') + .prop('checked', !!item.selected) + .prependTo($label); + break; + + case 'select': + $input = $('') + .attr('name', 'context-menu-input-' + key) + .appendTo($label); + if (item.options) { + $.each(item.options, function (value, text) { + $('').val(value).text(text).appendTo($input); + }); + $input.val(item.selected); + } + break; + + case 'sub': + createNameNode(item).appendTo($t); + item.appendTo = item.$node; + $t.data('contextMenu', item).addClass('context-menu-submenu'); + item.callback = null; + + // If item contains items, and this is a promise, we should create it later + // check if subitems is of type promise. If it is a promise we need to create + // it later, after promise has been resolved. + if ('function' === typeof item.items.then) { + // probably a promise, process it, when completed it will create the sub menu's. + op.processPromises(item, root, item.items); + } else { + // normal submenu. + op.create(item, root); + } + break; + + case 'html': + $(item.html).appendTo($t); + break; + + default: + $.each([opt, root], function (i, k) { + k.commands[key] = item; + // Overwrite only if undefined or the item is appended to the root. This so it + // doesn't overwrite callbacks of root elements if the name is the same. + if ($.isFunction(item.callback) && (typeof k.callbacks[key] === 'undefined' || typeof opt.type === 'undefined')) { + k.callbacks[key] = item.callback; + } + }); + createNameNode(item).appendTo($t); + break; + } + + // disable key listener in + if (item.type && item.type !== 'sub' && item.type !== 'html' && item.type !== 'cm_seperator') { + $input + .on('focus', handle.focusInput) + .on('blur', handle.blurInput); + + if (item.events) { + $input.on(item.events, opt); + } + } + + // add icons + if (item.icon) { + if ($.isFunction(item.icon)) { + item._icon = item.icon.call(this, this, $t, key, item); + } else { + if (typeof(item.icon) === 'string' && item.icon.substring(0, 3) === 'fa-') { + // to enable font awesome + item._icon = root.classNames.icon + ' ' + root.classNames.icon + '--fa fa ' + item.icon; + } else { + item._icon = root.classNames.icon + ' ' + root.classNames.icon + '-' + item.icon; + } + } + $t.addClass(item._icon); + } + } + + // cache contained elements + item.$input = $input; + item.$label = $label; + + // attach item to menu + $t.appendTo(opt.$menu); + + // Disable text selection + if (!opt.hasTypes && $.support.eventSelectstart) { + // browsers support user-select: none, + // IE has a special event for text-selection + // browsers supporting neither will not be preventing text-selection + $t.on('selectstart.disableTextSelect', handle.abortevent); + } + }); + // attach contextMenu to (to bypass any possible overflow:hidden issues on parents of the trigger element) + if (!opt.$node) { + opt.$menu.css('display', 'none').addClass('context-menu-root'); + } + opt.$menu.appendTo(opt.appendTo || document.body); + }, + resize: function ($menu, nested) { + var domMenu; + // determine widths of submenus, as CSS won't grow them automatically + // position:absolute within position:absolute; min-width:100; max-width:200; results in width: 100; + // kinda sucks hard... + + // determine width of absolutely positioned element + $menu.css({position: 'absolute', display: 'block'}); + // don't apply yet, because that would break nested elements' widths + $menu.data('width', + (domMenu = $menu.get(0)).getBoundingClientRect ? + Math.ceil(domMenu.getBoundingClientRect().width) : + $menu.outerWidth() + 1); // outerWidth() returns rounded pixels + // reset styles so they allow nested elements to grow/shrink naturally + $menu.css({ + position: 'static', + minWidth: '0px', + maxWidth: '100000px' + }); + // identify width of nested menus + $menu.find('> li > ul').each(function () { + op.resize($(this), true); + }); + // reset and apply changes in the end because nested + // elements' widths wouldn't be calculatable otherwise + if (!nested) { + $menu.find('ul').addBack().css({ + position: '', + display: '', + minWidth: '', + maxWidth: '' + }).outerWidth(function () { + return $(this).data('width'); + }); + } + }, + update: function (opt, root) { + var $trigger = this; + if (typeof root === 'undefined') { + root = opt; + op.resize(opt.$menu); + } + // re-check disabled for each item + opt.$menu.children().each(function () { + var $item = $(this), + key = $item.data('contextMenuKey'), + item = opt.items[key], + disabled = ($.isFunction(item.disabled) && item.disabled.call($trigger, key, root)) || item.disabled === true, + visible; + if ($.isFunction(item.visible)) { + visible = item.visible.call($trigger, key, root); + } else if (typeof item.visible !== 'undefined') { + visible = item.visible === true; + } else { + visible = true; + } + $item[visible ? 'show' : 'hide'](); + + // dis- / enable item + $item[disabled ? 'addClass' : 'removeClass'](root.classNames.disabled); + + if ($.isFunction(item.icon)) { + $item.removeClass(item._icon); + item._icon = item.icon.call(this, $trigger, $item, key, item); + $item.addClass(item._icon); + } + + if (item.type) { + // dis- / enable input elements + $item.find('input, select, textarea').prop('disabled', disabled); + + // update input states + switch (item.type) { + case 'text': + case 'textarea': + item.$input.val(item.value || ''); + break; + + case 'checkbox': + case 'radio': + item.$input.val(item.value || '').prop('checked', !!item.selected); + break; + + case 'select': + item.$input.val((item.selected === 0 ? "0" : item.selected) || ''); + break; + } + } + + if (item.$menu) { + // update sub-menu + op.update.call($trigger, item, root); + } + }); + }, + layer: function (opt, zIndex) { + // add transparent layer for click area + // filter and background for Internet Explorer, Issue #23 + var $layer = opt.$layer = $('
    ') + .css({ + height: $win.height(), + width: $win.width(), + display: 'block', + position: 'fixed', + 'z-index': zIndex, + top: 0, + left: 0, + opacity: 0, + filter: 'alpha(opacity=0)', + 'background-color': '#000' + }) + .data('contextMenuRoot', opt) + .insertBefore(this) + .on('contextmenu', handle.abortevent) + .on('mousedown', handle.layerClick); + + // IE6 doesn't know position:fixed; + if (typeof document.body.style.maxWidth === 'undefined') { // IE6 doesn't support maxWidth + $layer.css({ + 'position': 'absolute', + 'height': $(document).height() + }); + } + + return $layer; + }, + processPromises: function (opt, root, promise) { + // Start + opt.$node.addClass(root.classNames.iconLoadingClass); + + function completedPromise(opt, root, items) { + // Completed promise (dev called promise.resolve). We now have a list of items which can + // be used to create the rest of the context menu. + if (typeof items === 'undefined') { + // Null result, dev should have checked + errorPromise(undefined);//own error object + } + finishPromiseProcess(opt, root, items); + } + + function errorPromise(opt, root, errorItem) { + // User called promise.reject() with an error item, if not, provide own error item. + if (typeof errorItem === 'undefined') { + errorItem = { + "error": { + name: "No items and no error item", + icon: "context-menu-icon context-menu-icon-quit" + } + }; + if (window.console) { + (console.error || console.log).call(console, 'When you reject a promise, provide an "items" object, equal to normal sub-menu items'); + } + } else if (typeof errorItem === 'string') { + errorItem = {"error": {name: errorItem}}; + } + finishPromiseProcess(opt, root, errorItem); + } + + function finishPromiseProcess(opt, root, items) { + if (typeof root.$menu === 'undefined' || !root.$menu.is(':visible')) { + return; + } + opt.$node.removeClass(root.classNames.iconLoadingClass); + opt.items = items; + op.create(opt, root, true); // Create submenu + op.update(opt, root); // Correctly update position if user is already hovered over menu item + root.positionSubmenu.call(opt.$node, opt.$menu); // positionSubmenu, will only do anything if user already hovered over menu item that just got new subitems. + } + + // Wait for promise completion. .then(success, error, notify) (we don't track notify). Bind the opt + // and root to avoid scope problems + promise.then(completedPromise.bind(this, opt, root), errorPromise.bind(this, opt, root)); + } + }; + + // split accesskey according to http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#assigned-access-key + function splitAccesskey(val) { + var t = val.split(/\s+/); + var keys = []; + + for (var i = 0, k; k = t[i]; i++) { + k = k.charAt(0).toUpperCase(); // first character only + // theoretically non-accessible characters should be ignored, but different systems, different keyboard layouts, ... screw it. + // a map to look up already used access keys would be nice + keys.push(k); + } + + return keys; + } + +// handle contextMenu triggers + $.fn.contextMenu = function (operation) { + var $t = this, $o = operation; + if (this.length > 0) { // this is not a build on demand menu + if (typeof operation === 'undefined') { + this.first().trigger('contextmenu'); + } else if (typeof operation.x !== 'undefined' && typeof operation.y !== 'undefined') { + this.first().trigger($.Event('contextmenu', { + pageX: operation.x, + pageY: operation.y, + mouseButton: operation.button + })); + } else if (operation === 'hide') { + var $menu = this.first().data('contextMenu') ? this.first().data('contextMenu').$menu : null; + if ($menu) { + $menu.trigger('contextmenu:hide'); + } + } else if (operation === 'destroy') { + $.contextMenu('destroy', {context: this}); + } else if ($.isPlainObject(operation)) { + operation.context = this; + $.contextMenu('create', operation); + } else if (operation) { + this.removeClass('context-menu-disabled'); + } else if (!operation) { + this.addClass('context-menu-disabled'); + } + } else { + $.each(menus, function () { + if (this.selector === $t.selector) { + $o.data = this; + + $.extend($o.data, {trigger: 'demand'}); + } + }); + + handle.contextmenu.call($o.target, $o); + } + + return this; + }; + + // manage contextMenu instances + $.contextMenu = function (operation, options) { + if (typeof operation !== 'string') { + options = operation; + operation = 'create'; + } + + if (typeof options === 'string') { + options = {selector: options}; + } else if (typeof options === 'undefined') { + options = {}; + } + + // merge with default options + var o = $.extend(true, {}, defaults, options || {}); + var $document = $(document); + var $context = $document; + var _hasContext = false; + + if (!o.context || !o.context.length) { + o.context = document; + } else { + // you never know what they throw at you... + $context = $(o.context).first(); + o.context = $context.get(0); + _hasContext = !$(o.context).is(document); + } + + switch (operation) { + case 'create': + // no selector no joy + if (!o.selector) { + throw new Error('No selector specified'); + } + // make sure internal classes are not bound to + if (o.selector.match(/.context-menu-(list|item|input)($|\s)/)) { + throw new Error('Cannot bind to selector "' + o.selector + '" as it contains a reserved className'); + } + if (!o.build && (!o.items || $.isEmptyObject(o.items))) { + throw new Error('No Items specified'); + } + counter++; + o.ns = '.contextMenu' + counter; + if (!_hasContext) { + namespaces[o.selector] = o.ns; + } + menus[o.ns] = o; + + // default to right click + if (!o.trigger) { + o.trigger = 'right'; + } + + if (!initialized) { + var itemClick = o.itemClickEvent === 'click' ? 'click.contextMenu' : 'mouseup.contextMenu'; + var contextMenuItemObj = { + // 'mouseup.contextMenu': handle.itemClick, + // 'click.contextMenu': handle.itemClick, + 'contextmenu:focus.contextMenu': handle.focusItem, + 'contextmenu:blur.contextMenu': handle.blurItem, + 'contextmenu.contextMenu': handle.abortevent, + 'mouseenter.contextMenu': handle.itemMouseenter, + 'mouseleave.contextMenu': handle.itemMouseleave + }; + contextMenuItemObj[itemClick] = handle.itemClick; + // make sure item click is registered first + $document + .on({ + 'contextmenu:hide.contextMenu': handle.hideMenu, + 'prevcommand.contextMenu': handle.prevItem, + 'nextcommand.contextMenu': handle.nextItem, + 'contextmenu.contextMenu': handle.abortevent, + 'mouseenter.contextMenu': handle.menuMouseenter, + 'mouseleave.contextMenu': handle.menuMouseleave + }, '.context-menu-list') + .on('mouseup.contextMenu', '.context-menu-input', handle.inputClick) + .on(contextMenuItemObj, '.context-menu-item'); + + initialized = true; + } + + // engage native contextmenu event + $context + .on('contextmenu' + o.ns, o.selector, o, handle.contextmenu); + + if (_hasContext) { + // add remove hook, just in case + $context.on('remove' + o.ns, function () { + $(this).contextMenu('destroy'); + }); + } + + switch (o.trigger) { + case 'hover': + $context + .on('mouseenter' + o.ns, o.selector, o, handle.mouseenter) + .on('mouseleave' + o.ns, o.selector, o, handle.mouseleave); + break; + + case 'left': + $context.on('click' + o.ns, o.selector, o, handle.click); + break; + case 'touchstart': + $context.on('touchstart' + o.ns, o.selector, o, handle.click); + break; + /* + default: + // http://www.quirksmode.org/dom/events/contextmenu.html + $document + .on('mousedown' + o.ns, o.selector, o, handle.mousedown) + .on('mouseup' + o.ns, o.selector, o, handle.mouseup); + break; + */ + } + + // create menu + if (!o.build) { + op.create(o); + } + break; + + case 'destroy': + var $visibleMenu; + if (_hasContext) { + // get proper options + var context = o.context; + $.each(menus, function (ns, o) { + + if (!o) { + return true; + } + + // Is this menu equest to the context called from + if (!$(context).is(o.selector)) { + return true; + } + + $visibleMenu = $('.context-menu-list').filter(':visible'); + if ($visibleMenu.length && $visibleMenu.data().contextMenuRoot.$trigger.is($(o.context).find(o.selector))) { + $visibleMenu.trigger('contextmenu:hide', {force: true}); + } + + try { + if (menus[o.ns].$menu) { + menus[o.ns].$menu.remove(); + } + + delete menus[o.ns]; + } catch (e) { + menus[o.ns] = null; + } + + $(o.context).off(o.ns); + + return true; + }); + } else if (!o.selector) { + $document.off('.contextMenu .contextMenuAutoHide'); + $.each(menus, function (ns, o) { + $(o.context).off(o.ns); + }); + + namespaces = {}; + menus = {}; + counter = 0; + initialized = false; + + $('#context-menu-layer, .context-menu-list').remove(); + } else if (namespaces[o.selector]) { + $visibleMenu = $('.context-menu-list').filter(':visible'); + if ($visibleMenu.length && $visibleMenu.data().contextMenuRoot.$trigger.is(o.selector)) { + $visibleMenu.trigger('contextmenu:hide', {force: true}); + } + + try { + if (menus[namespaces[o.selector]].$menu) { + menus[namespaces[o.selector]].$menu.remove(); + } + + delete menus[namespaces[o.selector]]; + } catch (e) { + menus[namespaces[o.selector]] = null; + } + + $document.off(namespaces[o.selector]); + } + break; + + case 'html5': + // if and are not handled by the browser, + // or options was a bool true, + // initialize $.contextMenu for them + if ((!$.support.htmlCommand && !$.support.htmlMenuitem) || (typeof options === 'boolean' && options)) { + $('menu[type="context"]').each(function () { + if (this.id) { + $.contextMenu({ + selector: '[contextmenu=' + this.id + ']', + items: $.contextMenu.fromMenu(this) + }); + } + }).css('display', 'none'); + } + break; + + default: + throw new Error('Unknown operation "' + operation + '"'); + } + + return this; + }; + +// import values into commands + $.contextMenu.setInputValues = function (opt, data) { + if (typeof data === 'undefined') { + data = {}; + } + + $.each(opt.inputs, function (key, item) { + switch (item.type) { + case 'text': + case 'textarea': + item.value = data[key] || ''; + break; + + case 'checkbox': + item.selected = data[key] ? true : false; + break; + + case 'radio': + item.selected = (data[item.radio] || '') === item.value; + break; + + case 'select': + item.selected = data[key] || ''; + break; + } + }); + }; + +// export values from commands + $.contextMenu.getInputValues = function (opt, data) { + if (typeof data === 'undefined') { + data = {}; + } + + $.each(opt.inputs, function (key, item) { + switch (item.type) { + case 'text': + case 'textarea': + case 'select': + data[key] = item.$input.val(); + break; + + case 'checkbox': + data[key] = item.$input.prop('checked'); + break; + + case 'radio': + if (item.$input.prop('checked')) { + data[item.radio] = item.value; + } + break; + } + }); + + return data; + }; + +// find