本文整理汇总了TypeScript中guid.raw函数的典型用法代码示例。如果您正苦于以下问题:TypeScript raw函数的具体用法?TypeScript raw怎么用?TypeScript raw使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了raw函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: function
bcrypt.hash(password, 8, function(err, hash) {
if(!err) {
var request = new Request(
'[dbo].[CreateNewUser]',
function(err, rowCount) {
console.log('RC: ' + rowCount)
if (err) {
console.log(err);
res.status(500).send();
}
else {
connection.close();
res.status(200).send();
}
}
)
request.addParameter('UserId', TYPES.NVarChar, username);
request.addParameter('Password', TYPES.NVarChar, hash);
request.addParameter('Depot', TYPES.NVarChar, depot);
request.addParameter('CreatedOn', TYPES.DateTime, new Date());
request.addParameter('ApiKey', TYPES.NVarChar, Guid.raw());
request.addParameter('ServerKey', TYPES.NVarChar, Guid.raw());
request.addParameter('CreateUsers', TYPES.Bit, createUsers)
connection.callProcedure(request);
}
});
开发者ID:MattGauler,项目名称:support-portal-uat,代码行数:28,代码来源:createUser.ts
示例2: return
_.each(data, d => {
var master_obj = _.find(this.entityManager.getEntities('specsdim'), dim => {
return _.result(dim, 'specsdim_title') === d.master
});
if (master_obj === undefined) {
master_obj = this.entityManager.createEntity('specsdim', {
id: guid.raw(),
specsdim_title: d.master,
specsdim_display: d.display
});
}
if (d.dim != null && d.dim != undefined) {
var dim_obj = _.find(this.entityManager.getEntities('specsdim'), dim => {
return (_.result(dim, 'specsdim_title') === d.dim)
&& (_.result(master_obj, 'specsdim_title') === d.master);
});
if (dim_obj === undefined) {
dim_obj = this.entityManager.createEntity('specsdim', {
id: guid.raw(),
specsdim_title: d.dim,
specsdim_display: d.display,
specsdim_parentid: _.result(master_obj, 'id')
});
}
}
});
开发者ID:afriknet,项目名称:umarket,代码行数:36,代码来源:specsdim_srv.ts
示例3: insert_cat
insert_cat(name: string, parentid?: string, subs?: string[]) {
var e = this.entityManager.createEntity('itemcats', {
id: guid.raw(),
catname: name,
parentid: parentid,
isdemo: 1
});
if (subs) {
_.each(Object.keys(subs), s => {
this.insert_cat(s, _.result(e, 'id') as any);
});
}
}
开发者ID:afriknet,项目名称:umarket,代码行数:16,代码来源:itemcats_srv.ts
示例4: generateDeviceSupportRequest
generateDeviceSupportRequest(topic:string, subscription:string, supportMessageContent:any): any{
var base = this.generateBaseMessage(topic);
var customProperties = base;
customProperties.content = supportMessageContent;
customProperties.content.id = Guid.raw();
customProperties.content.messageDate = moment().toDate();
customProperties.target = subscription;
customProperties.topic = topic;
customProperties.channel = 'driverapp';
var message = {
body: JSON.stringify(customProperties),
customProperties: customProperties
};
return message;
}
开发者ID:MattGauler,项目名称:support-portal-uat,代码行数:18,代码来源:messageManager.ts
示例5: generateBaseMessage
generateBaseMessage(p_channel?:string): any {
/*
{
"id": "c56bcaff-8e00-446c-8755-9c477b742db7",
"channel": "t-notifyshamrock-0",
"subchannel": "1234",
"expiry": 1457607834463,
"date": 1457604234466,
"notification": "",
"provider": "",
"content": {
"@class": "ConnectivityRequest",
"data": {
"requestExpiry": 1457604299655
},
"driverId": "53224eb8-ce59-42a8-9391-e35d7a5b9eb5",
"id": "cff50718-c3eb-f2ed-45bc-fe662fd102f8",
"messageDate": "2016-03-10T10:03:19+00:00",
"subscriptionToken": "5-20501-6a996228-d73b-1add-baad-8c04bf8cbccb"
}
}
*/
var channel = p_channel || 't-notifyshamrock-0';
var message = {
id: Guid.raw(),
channel: channel ,
subchannel: '1234',
expiry: moment().add(1,'m').valueOf(),
date: moment().valueOf(),
notification: '',
provider: '',
content: {
'@class': ''
}
};
return message;
}
开发者ID:MattGauler,项目名称:support-portal-uat,代码行数:42,代码来源:messageManager.ts
示例6: sendInstructionToDevice
function sendInstructionToDevice() {
var customProperties = {
id: Guid.raw(),
channel: deviceUserId.toString(),
subchannel: '1',
expiry: 0,
date: 131007203230000000,
content: {
type: instructionType,
requester: userId,
instructionValues: instructionValues
}
};
var message = {
body: JSON.stringify(customProperties),
customProperties: customProperties
};
managers.commsManager.commsWorker.sendAndCreateQueue(message);
}
开发者ID:MattGauler,项目名称:support-portal-uat,代码行数:21,代码来源:instruction.ts
示例7: function
router.post('/', function(req, res, next) {
var managers = new Managers.Managers();
var customProperties = {
id: Guid.raw(),
channel: '899991',
subchannel: '1',
expiry: 0,
date: 131007203230000000,
content: {
test: 'test'
}
};
var message = {
body: JSON.stringify(customProperties),
customProperties: customProperties
};
managers.commsManager.commsWorker.sendAndCreateQueue(message);
res.send('success');
});
开发者ID:MattGauler,项目名称:support-portal-uat,代码行数:23,代码来源:sendMessageTest.ts
示例8: generateConnectionRequest
generateConnectionRequest(topic:string, subToken:string,driverId:string): any{
var base = this.generateBaseMessage();
var customProperties = base;
var content = {
"@class": "ConnectivityRequest",
data: {
"requestExpiry": moment().add(1,'m').valueOf()
},
driverId: driverId,
id: Guid.raw(),
messageDate: moment().toDate(),
subscriptionToken: subToken
}
customProperties.content = content;
customProperties.topic = topic;
customProperties.channel = 'driverapp';
var message = {
body: JSON.stringify(customProperties),
customProperties: customProperties
};
return message;
}
开发者ID:MattGauler,项目名称:support-portal-uat,代码行数:24,代码来源:messageManager.ts
注:本文中的guid.raw函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论