mirror of https://github.com/grpc/grpc.git
parent
a3366c1b7f
commit
f00508e9ce
2 changed files with 51 additions and 0 deletions
@ -0,0 +1,48 @@ |
||||
#region Copyright notice and license |
||||
// Copyright 2015 gRPC authors. |
||||
// |
||||
// Licensed under the Apache License, Version 2.0 (the "License"); |
||||
// you may not use this file except in compliance with the License. |
||||
// You may obtain a copy of the License at |
||||
// |
||||
// http://www.apache.org/licenses/LICENSE-2.0 |
||||
// |
||||
// Unless required by applicable law or agreed to in writing, software |
||||
// distributed under the License is distributed on an "AS IS" BASIS, |
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
// See the License for the specific language governing permissions and |
||||
// limitations under the License. |
||||
#endregion |
||||
|
||||
using System; |
||||
|
||||
namespace Grpc.Core |
||||
{ |
||||
/// <summary> |
||||
/// Defines the location of the service bind method for a gRPC service. |
||||
/// </summary> |
||||
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)] |
||||
public class BindServiceAttribute : Attribute |
||||
{ |
||||
/// <summary> |
||||
/// Initializes a new instance of the <see cref="BindServiceAttribute"/> class. |
||||
/// </summary> |
||||
/// <param name="bindType">The type the service bind method is defined on.</param> |
||||
/// <param name="bindMethodName">The name of the service bind method.</param> |
||||
public BindServiceAttribute(Type bindType, string bindMethodName) |
||||
{ |
||||
BindType = bindType; |
||||
BindMethodName = bindMethodName; |
||||
} |
||||
|
||||
/// <summary> |
||||
/// Gets the type the service bind method is defined on. |
||||
/// </summary> |
||||
public Type BindType { get; } |
||||
|
||||
/// <summary> |
||||
/// Gets the name of the service bind method. |
||||
/// </summary> |
||||
public string BindMethodName { get; } |
||||
} |
||||
} |
Loading…
Reference in new issue