public static void SetChannelAttribute(uint handle, ChannelAttribute attribute, float value) { if (!BASS_ChannelSetAttribute(handle, (uint)attribute, value)) { throw new BassException($"ChannelSetAttribute failed"); } }
public ChannelItemFilterContext(MemberInfo member, JsonSchemaResolver schemaResolver, JsonSchemaGenerator schemaGenerator, ChannelAttribute channel) { Member = member; SchemaResolver = schemaResolver; SchemaGenerator = schemaGenerator; Channel = channel; }
public static void SetChannelAttribute(this BassHandle handle, ChannelAttribute attribute, float value) { if (!handle.BASS_ChannelSetAttribute(attribute, value)) { throw new BassException("ChannelSetAttribute failed"); } }
public static double GetChannelAttribute(int Handle, ChannelAttribute attrib) { float temp = 0; BASS_ChannelGetAttribute(Handle, attrib, ref temp); return(temp); }
private static Type SetTitle(object channel, RssFeed f) { Type type = channel.GetType(); ChannelAttribute channelAttr = null; if (type.HasCustomAttributeOfType <ChannelAttribute>(out channelAttr)) { if (!string.IsNullOrEmpty(channelAttr.Title)) { f.Channel.Title = channelAttr.Title; } } if (string.IsNullOrEmpty(f.Channel.Title)) { PropertyInfo prop = type.GetFirstProperyWithAttributeOfType <TitleAttribute>(); if (prop != null) { f.Channel.Title = (string)prop.GetValue(channel, null); } else { f.Channel.Title = channel.ToString(); } } return(type); }
public static float GetChannelAttribute(this BassHandle handle, ChannelAttribute attribute) { if (!handle.BASS_ChannelGetAttribute(attribute, out var value)) { throw new BassException("ChannelGetAttribute failed"); } return(value); }
public static float GetChannelAttribute(uint handle, ChannelAttribute attribute) { var value = 0.0f; if (!BASS_ChannelGetAttribute(handle, (uint)attribute, ref value)) { throw new BassException($"ChannelGetAttribute failed"); } return(value); }
public List <ChannelDocument> GetDocumentation(AppDomain domain) { Debug.Assert(_services.Get <IChannelLocator>() != null); List <Type> channels = _services.Get <IChannelLocator>().RegisteredChannels(domain); foreach (var channel in channels) { ChannelDocument channelDoc = new ChannelDocument(); ChannelAttribute channelAttr = channel.GetCustomAttribute <ChannelAttribute>(); string channelDescription = channelAttr.Description == null ? string.Empty : channelAttr.Description.ToString(); string channelName = String.IsNullOrEmpty(channelAttr.Name) ? channel.Name : channelAttr.Name; string channelRoute = $"~/channels/{channelName}"; MethodInfo[] methods = channel.GetMethods().Where(x => x.GetCustomAttribute <ChannelMethodAttribute>() != null).ToArray(); ChannelMethodDocs = new List <ChannelMethodDocument>(); foreach (var method in methods) { ChannelMethodDocument methodDocument = new ChannelMethodDocument(); ChannelMethodInfo description = _services.Get <IChannelMethodDescriptor>().GetMethodDescription(method); ChannelMethodAttribute ChannelMethodAttribute = method.GetCustomAttribute <ChannelMethodAttribute>(); ChannelHttpMethod HttpMethod = ChannelMethodAttribute.HttpMethod; string[] names = description.Parameters.Select(x => x.Name).ToArray(); Type[] types = description.Parameters.Select(x => x.Type).ToArray(); methodDocument.HttpMethod = HttpMethod; methodDocument.InputParameters = names; methodDocument.InputParameterTypes = types; methodDocument.ReturnTypeName = method.ReturnType.Name; methodDocument.ReturnType = method.ReturnType; methodDocument.URL = $"{channelRoute}/{method.Name}/"; methodDocument.AuthSchema = ChannelMethodAttribute.Schema; methodDocument.Description = ChannelMethodAttribute.Description; //null possibility ChannelMethodDocs.Add(methodDocument); } channelDoc.Name = channel.Name; channelDoc.Description = channelDescription; //null possibility channelDoc.URL = channelRoute; channelDoc.AvailableEndpoints = ChannelMethodDocs; ChannelDocs.Add(channelDoc); } return(ChannelDocs); }
public ChannelItemFilterContext(MethodInfo method, ISchemaRepository schemaRepository, ChannelAttribute channel) { Method = method; SchemaRepository = schemaRepository; Channel = channel; }
public ChannelConfigurationInfo Configure(HttpListener httpChannel, Type channel, MethodInfo method, string baseURL) { ChannelEndpoint endpoint = new ChannelEndpoint(); ChannelAttribute channelAttr = channel.GetCustomAttribute <ChannelAttribute>(); if (!String.IsNullOrEmpty(channelAttr.Name)) { endpoint.URL = "/channels/" + channelAttr.Name + "/" + method.Name + "/"; } else { endpoint.URL = "/channels/" + channel.Name + "/" + method.Name + "/"; } endpoint.Name = channel.Name + "." + method.Name; ChannelMethodAttribute channelMethod = method.GetCustomAttribute <ChannelMethodAttribute>(); AuthorizeChannelAttribute authAttr = channel.GetCustomAttribute <AuthorizeChannelAttribute>(); ChannelAuthenticationSchemes channelSchema = channelMethod.Schema; ChannelHttpMethod httpMethod = channelMethod.HttpMethod; string methodURL = string.Empty; if (baseURL == null) { methodURL = "http://localhost:4200" + endpoint.URL; } else { methodURL = baseURL + endpoint.URL; } bool httpAuthRequired = false; //Start hosting httpChannel.Prefixes.Add(methodURL); if (authAttr != null) { if (authAttr.Schema != ChannelAuthenticationSchemes.Anonymous) { httpAuthRequired = true; } } //ChannelMethod can override ChannelAttribute Authentication Schemes if (channelSchema != ChannelAuthenticationSchemes.Anonymous) { httpAuthRequired = true; } else { if (authAttr != null) { channelSchema = authAttr.Schema; } } return(new ChannelConfigurationInfo { ChannelAttribute = channelAttr, MethodAttribute = channelMethod, MethodUrl = methodURL, HttpMethod = httpMethod, AuthScheme = channelSchema, AuthorizeAttribute = authAttr, AuthenticationRequired = httpAuthRequired, Endpoint = endpoint }); }
/// <exception cref="NotAvailableException">Channel object is no longer available.</exception> /// <exception cref="BassErrorException"> /// Some error occur to call a Bass function, check the error code and error message /// to get more error information. /// </exception> /// <exception cref="BassNotLoadedException"> /// Bass DLL not loaded, you must use <see cref="BassManager.Initialize" /> to /// load Bass DLL first. /// </exception> void IChannelInternal.SetAttribute(ChannelAttribute attribute, float value) { CheckAvailable(); ChannelModule.ChannelSetAttributeFunction.CheckResult( ChannelModule.ChannelSetAttributeFunction.Delegate(Handle, attribute, value)); }
private static extern bool BASS_ChannelSetAttribute(this BassHandle handle, ChannelAttribute attribute, float value);
internal PropertyAnimationCompletedEventArgs(ChannelAttribute property) { Property = property; }
/// <exception cref="NotAvailableException">Channel object is no longer available.</exception> /// <exception cref="BassErrorException"> /// Some error occur to call a Bass function, check the error code and error message /// to get more error information. /// </exception> /// <exception cref="BassNotLoadedException"> /// Bass DLL not loaded, you must use <see cref="BassManager.Initialize" /> to /// load Bass DLL first. /// </exception> float IChannelInternal.GetAttribute(ChannelAttribute attribute) { CheckAvailable(); float result = 0; ChannelModule.ChannelGetAttributeFunction.CheckResult( ChannelModule.ChannelGetAttributeFunction.Delegate(Handle, attribute, ref result)); return result; }
public bool Slide(ChannelAttribute attrib, double Value, int Time) { return(Bass.SlideChannelAttribute(Handle, attrib, (float)Value, Time)); }
/// <exception cref="NotAvailableException">Channel object is no longer available.</exception> /// <exception cref="BassErrorException"> /// Some error occur to call a Bass function, check the error code and error message /// to get more error information. /// </exception> /// <exception cref="BassNotLoadedException"> /// Bass DLL not loaded, you must use <see cref="BassManager.Initialize" /> to /// load Bass DLL first. /// </exception> bool IChannelInternal.IsSliding(ChannelAttribute attribute) { CheckAvailable(); return ChannelModule.ChannelIsSlidingFunction.CheckResult( ChannelModule.ChannelIsSlidingFunction.Delegate(Handle, attribute)); }
/// <summary> /// Initializes a new instance of the <see cref="ClientFinalMessage"/> class. /// </summary> /// <param name="clientFirstMessage">First client message.</param> /// <param name="serverFirstMessage">First server message.</param> public ClientFinalMessage(ClientFirstMessage clientFirstMessage, ServerFirstMessage serverFirstMessage) { Channel = new ChannelAttribute(clientFirstMessage.Gs2Header); Nonce = new NonceAttribute(serverFirstMessage.Nonce?.Value); }
public bool IsSliding(ChannelAttribute attrib) { return(Bass.IsChannelSliding(Handle, attrib)); }
public ChannelItemFilterContext(MemberInfo member, ISchemaRepository schemaRepository, ChannelAttribute channel) { Member = member; SchemaRepository = schemaRepository; Channel = channel; }
public static bool SetChannelAttribute(int Handle, ChannelAttribute attrib, double value) { return(BASS_ChannelSetAttribute(Handle, attrib, (float)value)); }
extern static bool BASS_ChannelSetAttribute(int Handle, ChannelAttribute attrib, float value);
public extern static bool IsChannelSliding(int Handle, ChannelAttribute attrib);
public extern static bool SlideChannelAttribute(int Handle, ChannelAttribute attrib, float value, int time);