/// <summary> /// Method to create discovery request content description. /// </summary> /// <returns></returns> private static ContentDescription GetDiscoveryRequestContentDescription() { ContentType contentType = new ContentType(ContactCenterDiscoveryAsyncResult.DiscoveryContentType); ContentDescription contentDescription = new ContentDescription(contentType, string.Empty /*body*/); return(contentDescription); }
protected virtual void PostProcess(ILGenerator ilG, ContentDescription opts, ParameterInfo bodyI) { var bodyT = bodyI.ParameterType; var ct = opts.Type; var di = opts.Disposition; if (null != ct) { ilG.Emit(OpCodes.Ldstr, ct); ilG.Emit(OpCodes.Call, typeof(Rfc2616).GetMethod("ContentType", new [] { typeof(string) })); ilG.Emit(OpCodes.Call, ContentType); } if (null != di) { ilG.Emit(OpCodes.Ldstr, di); ilG.Emit(OpCodes.Call, typeof(Rfc2616).GetMethod("Disposition", new [] { typeof(string) })); ilG.Emit(OpCodes.Call, ContentDisposition); if (opts.SetName) { ilG.Emit(OpCodes.Ldstr, bodyI.Name); ilG.Emit(OpCodes.Call, typeof(ContentBuilderExtensions).GetMethod("Name")); } if (typeof(FileStream).IsAssignableFrom(bodyT) && opts.SetFileName) { ilG.Emit(OpCodes.Ldarg, bodyI.Position + 1); ilG.Emit(OpCodes.Call, typeof(ContentBuilderExtensions).GetMethod("File", new [] { Cbi, typeof(FileStream) })); } } }
public VariableBlock(Control parent, ContentDescription contents, string[] parameters, Application.Controls.VariableBlock settings) { this._Parent = parent; this._Contents = contents; this._Parameters = parameters; this._Settings = settings; }
List <Widget> _buildItems(BuildContext context, out int commentIndex) { var originItems = new List <Widget> { this._buildContentHead() }; originItems.AddRange( ContentDescription.map( context: context, cont: this._article.body, contentMap: this._article.contentMap, this._article.videoSliceMap, this._article.videoPosterMap, openUrl: this.widget.actionModel.openUrl, playVideo: this.widget.actionModel.playVideo, this.widget.actionModel.pushToLogin, UserInfoManager.isLogin() ? CCommonUtils.GetUserLicense(UserInfoManager.initUserInfo().userId, this.widget.viewModel.userLicenseDict) : "", this.widget.actionModel.browserImage ) ); // originItems.Add(this._buildActionCards(this._article.like)); originItems.Add(this._buildRelatedArticles()); commentIndex = originItems.Count; originItems.AddRange(this._buildComments(context: context)); return(originItems); }
public ConditionalStatement(Control parent, ContentDescription contents, string[] parameters, Application.Controls.ConditionalStatement settings) { this._Parent = parent; this._Contents = contents; this._Parameters = parameters; this._Settings = settings; }
public UpdateBlock(string rawValue, ArgumentCollection arguments) : base(DirectiveTypes.UpdateBlock, arguments) { this.DirectiveId = DirectiveHelper.CaptureDirectiveId(rawValue); this._Contents = new ContentDescription(rawValue); this.UpdateBlockIds.Add(this.DirectiveId); }
public static Task <CallMessageData> SendMessageAsync( this AudioVideoCall call, MessageType messageType, ContentDescription contentDescription, CallSendMessageRequestOptions options) { return(Task <CallMessageData> .Factory.FromAsync(call.BeginSendMessage, call.EndSendMessage, messageType, contentDescription, options, null)); }
public PartialCache(string rawValue, int positionId, ArgumentCollection arguments) : base(DirectiveTypes.PartialCache, arguments) { this._PositionId = positionId; this._Parameters = DirectiveHelper.CaptureDirectiveParameters(rawValue, true); this._CacheIdExtensions = new string[this._Parameters.Length]; this._Contents = new ContentDescription(rawValue); }
public static Task<CallMessageData> SendMessageAsync( this AudioVideoCall call, MessageType messageType, ContentDescription contentDescription, CallSendMessageRequestOptions options) { return Task<CallMessageData>.Factory.FromAsync(call.BeginSendMessage, call.EndSendMessage, messageType, contentDescription, options, null); }
public DataList(Control parent, ContentDescription contents, string[] parameters, Application.Controls.DataList settings, Func <Guid, bool> cacheHandler) { this._Parent = parent; this._Contents = contents; this._Parameters = parameters; this._Settings = settings; this._CacheHandler = cacheHandler; }
public InLineStatement(string rawValue, ArgumentCollection arguments) : base(DirectiveTypes.InLineStatement, arguments) { this.DirectiveId = DirectiveHelper.CaptureDirectiveId(rawValue); this.BoundDirectiveId = DirectiveHelper.CaptureBoundDirectiveId(rawValue); this._Contents = new ContentDescription(rawValue); this._Cache = true; this._ParametersDefinition = null; }
protected virtual void Process(ILGenerator ilG, ContentDescription opts, ParameterInfo bodyI) { var bodyT = bodyI.ParameterType; ilG.Emit(OpCodes.Ldarg, bodyI.Position + 1); ilG.EmitNullConversion(bodyT); var mi = this[bodyI]; ilG.Emit(OpCodes.Call, mi); PostProcess(ilG, opts, bodyI); }
List <Widget> _buildItems(BuildContext context, out int commentIndex) { var originItems = new List <Widget> { this._buildContentHead() }; originItems.AddRange( ContentDescription.map(context, this._article.body, this._article.contentMap, this.widget.actionModel.openUrl, this.widget.actionModel.playVideo)); // originItems.Add(this._buildActionCards(this._article.like)); originItems.Add(this._buildRelatedArticles()); commentIndex = originItems.Count; originItems.AddRange(this._buildComments(context: context)); return(originItems); }
protected bool SendInfo(string data, List <SignalingHeader> headers) { base.DebugTrace("Inside LocalConnectivityTester SendInfo()", new object[0]); bool result; lock (this) { try { if (base.IsCallGone()) { base.Error = new TUC_RemoteEndDisconnected(); result = false; } else { this.sipInfoEvent = new ManualResetEvent(false); ContentType contentType = new ContentType("text/plain"); ContentDescription contentDescription = new ContentDescription(contentType, data); CallSendMessageRequestOptions callSendMessageRequestOptions = new CallSendMessageRequestOptions(); if (headers != null) { CollectionExtensions.AddRange <SignalingHeader>(callSendMessageRequestOptions.Headers, headers); } base.AudioCall.EndSendMessage(base.AudioCall.BeginSendMessage(1, contentDescription, callSendMessageRequestOptions, null, null)); base.DebugTrace("Inside LocalConnectivityTester SendInfo: sent SIPINFO", new object[0]); result = true; } } catch (Exception ex) { if (!(ex is RealTimeException) && !(ex is InvalidOperationException)) { throw; } base.Error = new TUC_SendSequenceError(ex.Message, ex); base.ErrorTrace("Inside LocalConnectivityTester SendInfo, error ={0}", new object[] { ex.ToString() }); result = false; } } return(result); }
List <Widget> _buildItems(BuildContext context) { var originItems = new List <Widget> { this._buildContentHead() }; originItems.AddRange( ContentDescription.map(context, this._article.body, this._contentMap, this.widget.actionModel.openUrl, this.widget.actionModel.playVideo)); // originItems.Add(this._buildActionCards(this._article.like)); originItems.Add(this._buildRelatedArticles()); originItems.AddRange(this._buildComments()); if (!this._article.hasMore) { originItems.Add(this._buildEnd()); } return(originItems); }
private void ClickCallBackSearch(object sender, EventArgs e) { //PetrelLogger.InfoBox("Inside ClickCallBackSearch"); var dockManager = CoreSystem.GetService <IDockManager>(); if (dockManager != null) { if (usercontrol != null) { var isPanelVisible = dockManager.IsContentVisible(usercontrol.Key); dockManager.SetContentVisible(usercontrol.Key, !isPanelVisible); } else { usercontrol = new UserControl1(); ContentDescription cdpdescrption = new ContentDescription(usercontrol.Key, usercontrol.Title); ControlFactoryMethod filterControlFactory = delegate { var view = usercontrol; // Avoid exception on application exit. Sergey is going to fix it: if (view.Parent != null) { return(new System.Windows.Forms.UserControl()); } return(new ElementHost() { Child = view, Text = usercontrol.Title }); }; dockManager.InstallContent(filterControlFactory, cdpdescrption, DockedLocation.Floating, new System.Drawing.Size(300, 300)); var isPanelVisible = dockManager.IsContentVisible(usercontrol.Key); dockManager.SetContentVisible(usercontrol.Key, !isPanelVisible); } } }
/// <inheritdoc/> public override int GetHashCode() { // Overflow is fine, just wrap. unchecked { int hash = 17; hash *= 23 + ApplicationName.GetHashCode(); hash *= 23 + ApplicationSystemId.GetHashCode(); hash *= 23 + ApplicationVersion.GetHashCode(); hash *= 23 + ContentDescription.GetHashCode(); hash *= 23 + Copyright.GetHashCode(); hash *= 23 + Corporation.GetHashCode(); hash *= 23 + CorporationAddress.GetHashCode(); hash *= 23 + Filename.GetHashCode(); hash *= 23 + Language.GetHashCode(); hash *= 23 + SourceCopyright.GetHashCode(); hash *= 23 + SourceDate.GetHashCode(); hash *= 23 + SourceName.GetHashCode(); hash *= 23 + TransmissionDate.GetHashCode(); return(hash); } }
public PermissionBlock(string rawValue, ArgumentCollection arguments) : base(DirectiveTypes.PermissionBlock, arguments) { this.DirectiveId = DirectiveHelper.CaptureDirectiveId(rawValue); this._Contents = new ContentDescription(rawValue); }
/// <summary> /// Output GEDCOM format for this instance. /// </summary> /// <param name="sw">Where to output the data to.</param> public override void Output(TextWriter sw) { sw.Write("0 HEAD"); sw.Write(Environment.NewLine); sw.Write("1 SOUR {0}", ApplicationSystemId); if (!string.IsNullOrEmpty(ApplicationName)) { sw.Write(Environment.NewLine); sw.Write("2 NAME {0}", ApplicationName); } if (!string.IsNullOrEmpty(ApplicationVersion)) { sw.Write(Environment.NewLine); sw.Write("2 VERS {0}", ApplicationVersion); } if (!string.IsNullOrEmpty(Corporation)) { sw.Write(Environment.NewLine); sw.Write("2 CORP {0}", Corporation); } if (CorporationAddress != null) { CorporationAddress.Output(sw, 3); } if (!string.IsNullOrEmpty(SourceName) || !string.IsNullOrEmpty(SourceCopyright) || SourceDate != null) { sw.Write(Environment.NewLine); sw.Write("2 DATA"); if (!string.IsNullOrEmpty(SourceName)) { sw.Write(" "); sw.Write(SourceName); } if (!string.IsNullOrEmpty(SourceCopyright)) { sw.Write(Environment.NewLine); sw.Write("3 COPR "); sw.Write(SourceCopyright); } if (SourceDate != null) { SourceDate.Output(sw); } } if (TransmissionDate != null) { TransmissionDate.Output(sw); } sw.Write(Environment.NewLine); sw.Write("1 FILE {0}", Filename); if (ContentDescription != null) { ContentDescription.Output(sw); } sw.Write(Environment.NewLine); sw.Write("1 GEDC"); sw.Write(Environment.NewLine); sw.Write("2 VERS 5.5.1"); sw.Write(Environment.NewLine); sw.Write("2 FORM LINEAGE-LINKED"); sw.Write(Environment.NewLine); sw.Write("1 CHAR UTF-8"); sw.Write(Environment.NewLine); if (!string.IsNullOrWhiteSpace(Language)) { sw.Write($"1 LANG {Language}"); } bool hasSubmitter = !string.IsNullOrEmpty(submitterXRefID); if (hasSubmitter) { sw.Write(Environment.NewLine); sw.Write($"1 SUBM @{submitterXRefID}@"); } }
public bool Equals(ContentTypeDescription input) { if (input == null) { return(false); } return (( CType == input.CType || (CType != null && CType.Equals(input.CType)) ) && ( Name == input.Name || (Name != null && Name.Equals(input.Name)) ) && ( ContentDescription == input.ContentDescription || (ContentDescription != null && ContentDescription.Equals(input.ContentDescription)) ) && ( PreviewImage == input.PreviewImage || (PreviewImage != null && PreviewImage.Equals(input.PreviewImage)) ) && ( Priority == input.Priority || (Priority.Equals(input.Priority)) ) && ( Reminder == input.Reminder || (Reminder != null && Reminder.Equals(input.Reminder)) ) && ( Properties == input.Properties || (Properties != null && Properties.SequenceEqual(input.Properties)) ) && ( TagMetadata == input.TagMetadata || (TagMetadata != null && TagMetadata.SequenceEqual(input.TagMetadata)) ) && ( TagMetadataItems == input.TagMetadataItems || (TagMetadataItems != null && TagMetadataItems.SequenceEqual(input.TagMetadataItems)) ) && ( UsageExamples == input.UsageExamples || (UsageExamples != null && UsageExamples.SequenceEqual(input.UsageExamples)) ) && ( ShowInContentEditor == input.ShowInContentEditor || (ShowInContentEditor != null && ShowInContentEditor.Equals(input.ShowInContentEditor)) ) && ( TypeOf == input.TypeOf || (TypeOf != null && TypeOf.Equals(input.TypeOf)) ) && ( BindIdentifierToProperty == input.BindIdentifierToProperty || (BindIdentifierToProperty != null && BindIdentifierToProperty.Equals(input.BindIdentifierToProperty)) ) && ( BoundRegex == input.BoundRegex || (BoundRegex != null && BoundRegex.Equals(input.BoundRegex)) ) && ( ForceIdentifierBinding == input.ForceIdentifierBinding || (ForceIdentifierBinding != null && ForceIdentifierBinding.Equals(input.ForceIdentifierBinding)) ) && ( AllowComments == input.AllowComments || (AllowComments != null && AllowComments.Equals(input.AllowComments)) ) && ( AutoEnglishPropertyFallback == input.AutoEnglishPropertyFallback || (AutoEnglishPropertyFallback != null && AutoEnglishPropertyFallback.Equals(input.AutoEnglishPropertyFallback)) ) && ( BulkUploadable == input.BulkUploadable || (BulkUploadable != null && BulkUploadable.Equals(input.BulkUploadable)) ) && ( Previews == input.Previews || (Previews != null && Previews.SequenceEqual(input.Previews)) ) && ( SuppressCmsPath == input.SuppressCmsPath || (SuppressCmsPath != null && SuppressCmsPath.Equals(input.SuppressCmsPath)) ) && ( PropertySections == input.PropertySections || (PropertySections != null && PropertySections.SequenceEqual(input.PropertySections)) )); }
/// <summary> /// <p><strong>Applies to: </strong>desktop apps only</p><p>Creates a Microsoft DirectX Video Acceleration High Definition (DXVA-HD) device.</p> /// </summary> /// <param name="device"><dd> <p>A reference to the <strong><see cref="SharpDX.Direct3D9.DeviceEx"/></strong> interface of a Direct3D 9 device.</p> </dd></param> /// <param name="contentDescription"><dd> <p>A reference to a <strong><see cref="SharpDX.MediaFoundation.DirectX.ContentDescription"/></strong> structure that describes the video content. The driver uses this information as a hint when it creates the device.</p> </dd></param> /// <param name="usage"><dd> <p>A member of the <strong><see cref="SharpDX.MediaFoundation.DirectX.DeviceUsage"/></strong> enumeration, describing how the device will be used. The value indicates the desired trade-off between speed and video quality. The driver uses this flag as a hint when it creates the device.</p> </dd></param> /// <remarks> /// <p> Use the <strong><see cref="SharpDX.MediaFoundation.DirectX.HDDevice"/></strong> interface to get the device capabilities, create the video processor, and allocate video surfaces. </p> /// </remarks> /// <include file='..\Documentation\CodeComments.xml' path="/comments/comment[@id='DXVAHD_CreateDevice']/*"/> /// <msdn-id>dd318412</msdn-id> /// <unmanaged>HRESULT DXVAHD_CreateDevice([In] IDirect3DDevice9Ex* pD3DDevice,[In] const DXVAHD_CONTENT_DESC* pContentDesc,[In] DXVAHD_DEVICE_USAGE Usage,[In, Optional] __function__stdcall* pPlugin,[Out, Fast] IDXVAHD_Device** ppDevice)</unmanaged> /// <unmanaged-short>DXVAHD_CreateDevice</unmanaged-short> public HDDevice(SharpDX.Direct3D9.DeviceEx device, ContentDescription contentDescription, DeviceUsage usage) { DXVAFactory.CreateDevice(device, ref contentDescription, usage, null, this); }
public ReplaceableTranslation(string rawValue, ArgumentCollection arguments) : base(DirectiveTypes.ReplaceableTranslation, arguments) { this.DirectiveId = DirectiveHelper.CaptureDirectiveId(rawValue); this._Contents = new ContentDescription(rawValue); }
public Single(string rawValue, ArgumentCollection arguments) : base(DirectiveTypes.Single, arguments) { rawValue = $"Single~0:{{{rawValue}}}:Single~0"; this._Contents = new ContentDescription(rawValue); }
public EncodedExecution(string rawValue, ArgumentCollection arguments) : base(DirectiveTypes.EncodedExecution, arguments) { this._Contents = new ContentDescription(rawValue); this._Clean = false; }